Maitri Sharma

Maitri Sharma

1661249415

PHYSICS FORMULAS CLASS 11 FOR IIT JEE & NEET CHAPTER-FLUID MECHANICS

Fluid is the name given to a substance, which begins to flow when an external force is applied to it. Get the detailed formulas of the class11 fluid mechanics chapter for students preparing for IITJee, Neet, and their semester exams. All Formulas are explained effectively to avoid confusion. These solutions are prepared by expert faculties of Physics who have 10+years of experience in this field.

https://www.pw.live/physics-formula/class-11-fluid-mechanics-formulas

 

#physicsformulas #physics  #chemistry #biology #astronomy #neet #space  #astrophysics #nasa #universe #maths #quantumphysics #engineering #physicsfun #math #mathematics #cosmos #scientist  #education  #cosmology #facts 
 

PHYSICS FORMULAS CLASS 11 FOR IIT JEE & NEET  CHAPTER-FLUID MECHANICS
Castore  DeRose

Castore DeRose

1660039380

Cosmos Ecosystem Overview | Top 100 Project Built on Cosmos (ATOM)

In this article, you'll learn Cosmos, Cosmos Ecosystem Overview | Top 100 Project Built on Cosmos (ATOM)

1. What is Cosmos?

Visit: https://cosmos.network/

  • Cosmos makes blockchains powerful and easy to develop with Tendermint BFT and the modularity of the Cosmos SDK.
  • Cosmos enables blockchains to transfer value with each other through IBC and Peg-Zones, while letting them retain their sovereignty.
  • Cosmos allows blockchain applications to scale to millions of users through horizontal and vertical scalability solutions.

More than anything, Cosmos is not a product but an ecosystem built on a set of modular, adaptable and interchangeable tools. Developers are encouraged to join the effort to improve existing tools and create new ones in order to make the promise of blockchain technology a reality. These tools are the foundation needed to create the decentralized internet and global financial system of tomorrow.

How does Cosmos fit in the broader blockchain ecosystem?

THE BITCOIN STORY (BLOCKCHAIN 1.0)

To understand how Cosmos fits in the blockchain ecosystem, we need to go back to the beginning of the blockchain story. The first blockchain was Bitcoin, a peer-to-peer digital currency created in 2008 that used a novel consensus mechanism known as Proof-of-Work (PoW). It was the first decentralized application on a blockchain. Soon, people started to realize the potential of decentralized applications and the desire to build new ones emerged in the community.

At the time, there were two options to develop decentralized applications: either fork the bitcoin codebase or build on top of it. However, the bitcoin codebase was very monolithic; all three layers—networking, consensus and application — were mixed together. Additionally, the Bitcoin scripting language was limited and not user-friendly. There was a need for better tools.

THE ETHEREUM STORY (BLOCKCHAIN 2.0)

In 2014, Ethereum came in with a new proposition for building decentralized applications. There would be a single blockchain where people would be able to deploy any kind of program. Ethereum achieved this by turning the Application layer into a virtual machine called the Ethereum Virtual Machine (EVM). This virtual machine was able to process programs called smart contracts that any developer could deploy to the Ethereum blockchain in a permissionless fashion. This new approach allowed thousands of developers to start building decentralized applications (dApps). However, limitations to this approach soon became apparent and still persist to this day.

Scalability: The first limitation is scaling - decentralized applications built on top of Ethereum are inhibited by a shared rate of 15 transactions per second. This is due to the fact that Ethereum still uses Proof-of-Work and that Ethereum dApps compete for the limited resources of a single blockchain.

Usability: The second limitation is the relatively low flexibility granted to developers. Because the EVM is a sandbox that needs to accommodate all use cases, it optimizes for the average use case. This means that developers have to make compromises on the design and efficiency of their application (for example, requiring use of the account model in a payments platform where a UTXO model may be preferred). Among other things, they are limited to a few programming languages and cannot implement automatic execution of code.

Sovereignty: The third limitation is that each application is limited in sovereignty, because they all share the same underlying environment. Essentially, this creates two layers of governance: that of the application, and that of the underlying environment. The former is limited by the latter. If there is a bug in the application, nothing can be done about it without the approval of the governance of the Ethereum platform itself. If the application requires a new feature in the EVM, it again has to rely entirely on the governance of the Ethereum platform to accept it.

These limitations are not specific to Ethereum but to all blockchains trying to create a single platform that would fit all use cases. This is where Cosmos comes into play.

THE VISION OF COSMOS (BLOCKCHAIN 3.0)

The vision of Cosmos is to make it easy for developers to build blockchains and break the barriers between blockchains by allowing them to transact with each other. The end goal is to create an Internet of Blockchains, a network of blockchains able to communicate with each other in a decentralized way. With Cosmos, blockchains can maintain sovereignty, process transactions quickly and communicate with other blockchains in the ecosystem, making it optimal for a variety of use cases.

This vision is achieved through a set of open source tools like Tendermint, the Cosmos SDK and IBC designed to let people build custom, secure, scalable and interoperable blockchain applications quickly. Let us take a closer look at some of the most important tools in the ecosystem as well as the technical architecture of the Cosmos network. Note that Cosmos is an open source community project initially built by the Tendermint team. Everyone is welcome to build additional tools to enrich the greater developer ecosystem.

What is Tendermint BFT and the ABCI

Until recently, building a blockchain required building all three layers (Networking, Consensus, and Application) from the ground up. Ethereum simplified the development of decentralized applications by providing a Virtual-Machine blockchain on which anyone could deploy custom logic in the form of Smart Contracts. However, it did not simplify the development of blockchains themselves. Much like Bitcoin, Go-Ethereum remains a monolithic tech stack that is difficult to fork from and customize. This is where Tendermint, created by Jae Kwon in 2014, came in.

Tendermint BFT is a solution that packages the networking and consensus layers of a blockchain into a generic engine, allowing developers to focus on application development as opposed to the complex underlying protocol. As a result, Tendermint saves hundreds of hours of development time. Note that Tendermint also designates the name of the byzantine fault tolerant (BFT) consensus algorithm used within the Tendermint BFT engine. For more on the history of consensus protocols and BFT you can check this cool podcast by Tendermint co-founder Ethan Buchman.

The Tendermint BFT engine is connected to the application by a socket protocol called the Application Blockchain Interface (ABCI). This protocol can be wrapped in any programming language, making it possible for developers to choose a language that fits their needs.

But that is not all. Here are the properties that make Tendermint BFT a state-of-the-art blockchain engine:

  • Public or private blockchain ready: Tendermint BFT only handles networking and consensus for a blockchain, meaning that it helps nodes propagate transactions and validators agree on a set of transactions to append to the blockchain. It is the role of the application layer to define how the validator set
  • is constituted. Developers can therefore build both public and private blockchains on top of the Tendermint BFT engine. If the application defines that validators are elected based on how many tokens they have at stake, then the blockchain can be characterised as Proof-of-Stake (PoS)
  • . If however the application defines that only a restricted set of pre-authorized entities can be validators, then the blockchain can be characterised as permissioned or private. Developers have all the freedom to customize the rules that define how the validator set of their blockchain changes.
  • High Performance: Tendermint BFT can have a block time on the order of 1 second and handle up to thousands of transactions per second.
  • Instant finality: A property of the Tendermint consensus algorithm is instant finality. This means that forks are never created as long as more than a third of the validators are honest (byzantine). Users can be sure their transactions are finalized as soon as a block is created (which is not the case in Proof-of-Work blockchains like Bitcoin and Ethereum).
  • Security: Tendermint consensus is not only fault tolerant, it is also accountable. If the blockchain forks, there is a way to determine liability.

Cosmos SDK and other application layer frameworks

Tendermint BFT reduces the development time of a blockchain from years to weeks, but building a secure ABCI-app from scratch remains a difficult task. This is why the Cosmos SDK exists.

The Cosmos SDK is a generalized framework that simplifies the process of building secure blockchain applications on top of Tendermint BFT. It is based on two major principles:

  • Modularity: The goal of the Cosmos SDK is to create an ecosystem of modules
  • that allows developers to easily spin up application-specific blockchains
  • without having to code each bit of functionality of their application from scratch. Anyone can create a module for the Cosmos SDK, and using ready built modules in your blockchain is as simple as importing them into your application. For example, the Tendermint team is building a set of basic modules that are needed for the Cosmos Hub
  • . These modules can be used by any developer as they build their own application. Additionally, developers can create new modules to customize their application. As the Cosmos network develops, the ecosystem of SDK modules will expand, making it increasingly easier to develop complex blockchain applications.
  • Capabilities-based security: Capabilities constrain the security boundaries between modules, enabling developers to better reason about the composability of modules and limit the scope of malicious or unexpected interactions.

The Cosmos SDK also comes with a set of useful developer tools for building command line interfaces (CLI), REST servers and a variety of other commonly used utility libraries.

One final remark: the Cosmos SDK, like all Cosmos tools, is designed to be modular. Today, it allows developers to build on top of Tendermint BFT. However, it can be used with any other consensus engines that implements the ABCI. As time goes by, we expect multiple SDKs to emerge, built with different architecture models and compatible with multiple consensus engines - all within a single ecosystem: the Cosmos Network.

ETHERMINT

The great thing about the Cosmos SDK is that its modularity allows developers to port virtually any existing blockchain codebase already in Golang on top of it. For example, Ethermint

is a project that ports the Ethereum Virtual Machine into an SDK module. Ethermint works exactly like Ethereum but also benefits from all the properties of Tendermint BFT. All the existing Ethereum tools (Truffle, Metamask, etc.) are compatible with Ethermint and you can port your smart contracts over without additional work.

Today are developed on top of Virtual Machine blockchains like Ethereum. First, it should be stated that the reason for this phenomenon is that up until now blockchains were much more difficult to develop than Smart Contracts. This is not the case anymore, thanks to the Cosmos SDK. Now, developers can easily develop entire application-specific blockchains, which have several advantages. Among others, they give more flexibility, security, performance and sovereignty. Of course, if you don’t want to build your own blockchain, you can still make your Smart Contracts compatible with Cosmos by deploying them on Ethermint.

Connecting Blockchains Together - IBC

Now that developers have a way to quickly build customized blockchains, let us see how to connect these blockchains together. The connection between blockchains is achieved through a protocol called Inter-Blockchain Communication protocol (IBC). IBC leverages the instant finality property of Tendermint consensus (although it can work with any “fast-finality” blockchain engine) to allow heterogeneous chains to transfer value (i.e. tokens) or data to each other.

WHAT ARE HETEROGENEOUS CHAINS?

Essentially it comes down to two things:

  • Different layers: Heterogeneous chains have different layers, meaning they can differ in how they implement the networking, consensus and application parts. To be compatible with IBC, a blockchain needs only follow a few requirements, the main one being that the consensus layer must have fast finality. Proof-of-Work chains (like Bitcoin and Ethereum) do not fall in this category, as they have probabilistic finality.
  • Sovereignty: Every blockchain is maintained by a set of validators whose job is to agree on the next block to commit to the blockchain. In Proof-of-Work blockchains these validators are called miners. A sovereign blockchain is a blockchain with its own validator set. In many instances it is important for blockchains to be sovereign, as validators are ultimately responsible for modifying the state. In Ethereum, applications are all run by a common set of validators. Because of this, each application only has limited sovereignty.

IBC allows heterogeneous blockchains to transfer tokens and data to each other, meaning that blockchains with different applications and validator sets are interoperable. For example, it allows public and private blockchains to transfer tokens to each other. Currently, no other blockchain framework enables this level of interoperability.

HOW IBC WORKS

The principle behind IBC is fairly simple. Let us take an example where an account on chain A wants to send 10 tokens (let us call them ATOM) to chain B.

  • Tracking: Continuously, chain B receives the headers of chain A, and vice versa. This allows each chain to track the validator set of the other. In essence, each chain runs a light-client of the other.
  • Bonding: When the IBC transfer is initiated, the ATOM are locked up (bonded) on chain A.
  • Proof Relay: Then, a proof that the 10 ATOM are bonded is relayed from chain A to chain B.
  • Validation: The proof is verified on chain B against chain A’s header and, if it is valid, then 10 ATOM-vouchers are created on chain B.

How IBC Works #4

Note that the ATOM that have been created on chain B are not real ATOM, as ATOM only exist on chain A. They are a representation on B of ATOM from chain A, along with a proof that these ATOM are frozen on chain A. A similar mechanism is used to unlock ATOM when they come back to their origin chain. 

Designing the “Internet of Blockchains”

IBC is a protocol that allows two heterogeneous blockchains to transfer tokens to each other. From there, how do we create a network of blockchains?

One idea is to connect each blockchain in the network with every other via direct IBC connections. The main problem with this approach is that the number of connections in the network grows quadratically with the number of blockchains. If there are 100 blockchains in the network and each needs to maintain an IBC connection with every other, that is 4950 connections. This quickly gets out of hand.

To solve this, Cosmos proposes a modular architecture with two classes of blockchain: Hubs and Zones. Zones are regular heterogenous blockchains and Hubs are blockchains specifically designed to connect Zones together. When a Zone creates an IBC connection with a Hub, it can automatically access (i.e. send to and receive from) every other Zone that is connected to it. As a result, each Zone only needs to establish a limited number of connections with a restricted set of Hubs. Hubs also prevent double spending among Zones. This means that when a Zone receives a token from a Hub, it only needs to trust the origin Zone of this token and the Hub.

The first Hub launched in the Cosmos Network is the Cosmos Hub. The Cosmos Hub is a public Proof-of-Stake blockchain whose native staking token is called the ATOM, and where transactions fees will be payable in multiple tokens. The launch of the Hub also marks the launch of the Cosmos network.

Bridging non-Tendermint chains

So far, the architecture of Cosmos we have presented shows how Tendermint-based chains can interoperate. But Cosmos is not limited to Tendermint chains. In fact, any kind of blockchain can be connected to Cosmos.

We have two cases to distinguish: fast-finality chains and probabilistic-finality chains.

FAST-FINALITY CHAINS

Blockchains that use any fast-finality consensus algorithms can connect with Cosmos by adapting IBC. For example, if Ethereum were to switch to Casper FFG (Friendly Finality Gadget), a direct connection could be established between it and the Cosmos Ecosystem by adapting IBC to work with Casper.

PROBABILISTIC-FINALITY CHAINS

For blockchains that do not have fast-finality, like Proof-of-Work chains, things get a bit trickier. For these chains we use a special kind of proxy-chain called a Peg-Zone. A Peg-Zone is a blockchain that tracks the state of another blockchain. The Peg-Zone itself has fast-finality and is therefore compatible with IBC. Its role is to establish finality for the blockchain it bridges. Let us look at the following example.

Example: Ethereum Peg-Zone

Interestingly enough, the Peg-Zone also allows users to send any token that lives on Cosmos to the Ethereum chain (the Cosmos tokens would be represented as ERC20 on the Ethereum chain). The Tendermint team is currently working on a Peg-Zone implementation for the Ethereum chain called Peggy.

Peg-Zones will need to be customized for the particular chain they bridge. Building an Ethereum Peg-Zone is relatively simple because Ethereum is account-based and has smart-contracts. However, building a Bitcoin Peg-Zone is a bit more challenging. Explaining how to build a Bitcoin-like Peg-Zone is out-of-scope for this intro but know that it is theoretically possible. If you want to learn more about Peg-Zones you can take a look at this spec.

Solving Scalability

Now that we can easily create and connect blockchains there is one final issue to tackle: Scalability. Cosmos leverages two types of scalability:

  • Vertical scalability: This encompasses the methods for scaling the blockchain itself. By moving away from Proof-of-Work and optimizing its components, Tendermint BFT can reach thousands of transactions per-second. The bottleneck factor is the application itself. For example, an application like a Virtual Machine (e.g. the Ethereum Virtual Machine) will impose a much lower limit on the transaction throughput than an application where transaction types and state transition
  • functions are directly embedded in it (e.g. a standard Cosmos SDK application). This is one of the reasons why application-specific blockchains make sense.
  • Horizontal scalability: Even if the consensus engine and the application are highly optimized, at some point the transaction throughput of a single chain inevitably hits a wall it cannot surpass. That is the limit of vertical scaling. To go beyond it, the solution is to move to multi-chain architectures. The idea is to have multiple parallel chains running the same application and operated by a common validator set, making blockchains theoretically infinitely scalable. Details about horizontal scalability are fairly complex and out-of-scope for this intro.

Cosmos will offer very good vertical scalability at launch, which will be a major improvement over current blockchain solutions in and of itself. Later, after the completion of the IBC module, horizontal scalability solutions will be implemented.

Top exchanges for ATOM trading. 

BinancePoloniexBitfinexHuobiMXCProBITGate.io


2. Cosmos Ecosystem Overview

The Cosmos ecosystem is a decentralized network designed to connect various blockchains as part of an ambitious drive to power an ‘Internet of blockchains’. Using a novel technology called Inter-Blockchain Communication (IBC) protocol, Cosmos is able to facilitate seamless interaction and exchange of information between chains in its ecosystem. At the same time, Cosmos also offers tools that can drastically streamline and speed up the development of purpose-built blockchains, as part of a bid to reimagine what building blockchain applications can really be. 

Ultimately, Cosmos seeks to solve the limitations of the current generation of blockchain tech and usher in a new era of increased scalability, usability and interoperability in the blockchain space. 

TypeNameDescribeTokenExchangeLink
Behind CosmosCosmos NetworkCosmos is an ever-expanding ecosystem of interconnected apps and services, built for a decentralized future.ATOM BinanceWebsite
Cosmos SDKThe worlds most popular blockchain framework. Over $6 billion in assets are managed by public blockchains built with the Cosmos SDK. Build yours today.ATOM BinanceWebsite
TendermintBuilding the most powerful tools for distributed networks.  Website
IBC ProtocollIBC is an interoperability protocol for communicating arbitrary data between arbitrary state machines. It provides an end-to-end, connection-oriented, stateful protocol for reliable, ordered, and authenticated communication between heterogeneous blockchains or off-chain protocols (rollups), and can accomodate for both known and dynamic validator topologies.  Website
DEX AMM SwapsThorchainDECENTRALIZED LIQUIDITY PROTOCOL Deposit native assets into Liquidity Pools to earn yield. The network is 100% autonomous and decentralized.RUNEBinanceWebsite
Injective ProtocolInjective enables access to unlimited decentralized finance markets. Users can create any financial market on Injective’s fast, cross-chain, zero gas fee, secure, and fully decentralized exchange protocol.INJBinanceWebsite
OsmosisOsmosis DEX for the Cosmos ecosystem.OSMOMEXCWebsite
VegaVega has designed fully automated processes for creating markets on and trading margined derivatives. Markets will be open and decentralised, with pseudonymous participants.VEGA Website
Gravity BridgeEnter the portal to cross-chain DeFi. Swap, transfer, and pool assets with Emeris. Manage assets across multiple chains all in one place, elevating your DeFi experience to the next level.  Website
Sommelier FinanceSommelier is a coprocessor for Ethereum that moves DeFi assets from Automated Money Markets into higher yields more quickly and cheaply than was previously possible through non automated yield farming across different protocols.SOMM Website
Bridges Cross Chain InteroperabilityIrisnetIRISnet (a.k.a IRIS Hub) is designed to be the foundation for the next generation distributed applications. Built with Cosmos-SDK, IRIS Hub enables cross-chain interoperability through a unified service model, while providing a variety of modules to support DeFi applications. 

IRIS Hub is designed to support not only token transfers across internet of blockchains, but also to allow consumption of data and computing resources across heterogenous systems mechanism, token economics, etc.)
IRISBinanceWebsite
Loomx NetworkLoom Network provides developers the scalability and usability they need to build high-performance user-facing dapps today. With seamless integrations to Bitcoin, Ethereum, Binance Chain, and all major blockchains, deploying once to Loom lets you future-proof your dapp by reaching the largest number of users possible.LOOMBinanceWebsite
UmeeUmee is a layer-one blockchain built on Cosmos designed to create a universal cross-chain DeFi hub. It serves as a base layer for future DApps and money legos. Thanks to the interoperability of the Tendermint Proof-of-stake consensus mechanism used, the Umee blockchain can be integrated with Cosmos, Ethereum, side chains, layer-two chains, and alternative base-layer protocols.UMEEFTXWebsite
InterchainWe believe that open-source, cryptographic, consensus-driven, economic networks hold the key to an anti-fragile global economic system and equal opportunity for all. Our current focus is on the interoperable blockchain technology of the Cosmos Network  Website
AxelarAxelar is an overlay network, delivering Turing-complete message passing via proof-of-stake and permissionless protocols. Developers use Axelar to go beyond bridges, creating dApps that securely integrate users, functions and assets across all of the decentralized web.AXL Website
Liquid StakingPersistencePersistence is enabling exposure to multiple asset classes such as Liquid Staking (pSTAKE), NFTs (Asset Mantle) and Synthetics (Comdex). Persistence’s mission is to create an ecosystem of multi-chain Web3 products designed to stimulate global liquidity and enable seamless value exchange.

Persistence’s Core mainnet is a Proof-of-Stake chain powered by Tendermint BFT consensus engine. Persistence’s multi-chain tech stack (currently supporting Cosmos, Ethereum and other Tendermint-based chains) abstracts away the complexities for developers and enables them to create DEXs, marketplaces, lending/borrowing platforms etc.
XPRTGateWebsite
Lido FinanceLido is a liquid staking protocol for POS blockchains. It gives you a liquid token that represents your staked collateral and earnings over time. Lido removes the need to run infrastructure and enabling continued participation in DeFi.

wstETH is a wrapped version of stETH. Instead of rebasing, or changing account holdings daily it is similar to a c-token. It represents a pro-rata ownership of the staked ETH (stETH). When someone exits wstETH they are returned principal stETH + stETH earnings.
 
WSTETHUniswapWebsite
Smart Contract EVMKadenaKadena is a proof-of-work blockchain that combines the PoW consensus mechanism from Bitcoin with directed acyclic graph (DAG) principles to offer a scalable version of Bitcoin. Kadena claims it can provide the security of Bitcoin while being able to offer unparalleled throughput that makes the blockchain usable to enterprises and entrepreneurs alike. Kadena's unique infrastructure is decentralized and built for mass adoption because of its multi-chain approach.KDABinanceWebsite
JunoJuno is a sovereign public blockchain in the Cosmos ecosystem, which provides an environment for the deployment of interoperable smart contracts. The network serves as a decentralized, permissionless & censorship resistant avenue for developers to efficiently and securely launch smart contracts using proven frameworks and compile them in various languages Rust & Go. Battle tested contract modules such as CosmWasm, allow for decentralized applications (dapps) to be compiled on robust and secure multi-chain smart contracts.
 
JUNOMEXCWebsite
EvmosEvmos is an Inter-Blockchain Communication protocol, a.k.a. IBC; the IP layer for blockchains. IBC is currently the safest and most secure and decentralized way to move assets across different blockchains, unlocking interoperability across multiple chains.

Evmos leverages the Cosmos SDK serves as the first IBC-compatible EVM-based chain, bringing composability, interoperability, and fast finality to Ethereum.
EVMOSMEXCWebsite
CronosCronos Chain. Get Instant DApp Portability with EVM Support.  Website
CosmwasmBuild your robust dApps on secure, multi-chain smart contracts!  Website
AgoricBuild Fast, Earn FastTM. A Proof-of-Stake chain utilizing secure JavaScript smart contracts to rapidly build and deploy DeFi.BLD Website
PrivacySecret NetworkSecret Network is the first blockchain with data privacy by default, allowing you to build and use applications that are both permissionless and privacy-preserving. This unique functionality protects users, secures applications, and unlocks hundreds of new use cases for Web 3.SCRTBinanceWebsite
Oasis ProtocolA new era of blockchain. The Oasis Network is a privacy-enabled blockchain platform for open finance and a responsible data economy.ROSEBinanceWebsite
Nym TechExisting internet protocols leak sensitive data that can be used without users knowledge — Nym is developing the infrastructure to prevent this data leakage by protecting every packet’s metadata at the network and application layers.NYMOKXWebsite
Anoma NetworkUndefining Money. A sovereign, proof-of-stake blockchain protocol that enables private, asset-agnostic cash and private bartering among any number of parties.  Website
IdentityStarnameIt enables users to receive crypto-currencies or to log in to blockchain applications in a seamless way. Transferring value becomes fast and easy.IOVHotbitWebsite
WetrustBuild, share, and manage your digital identity. Securely build your online profile and reputation.TRSTBancorWebsite
CheqdBuilding a private and secure SSI digital credentials network on Cosmos for the trusted data economy.CHEQGateWebsite
AI and CloudAkashDEPLOY FASTER. SCALE QUICKLY. Censorship-resistant, permissionless, and self-sovereign, Akash Network is the world’s first open source cloud.AKTGateWebsite
VitwitBuild. Automate. Scale. We build Intelligent & autonomous solutions for our clients as part of digital transformations in the AI era. We pioneer the technology to empower businesses with insights and intelligent systems.  Website
SustainabilityRegen NetworkRegen Ledger is a sovereign, proof-of-stake blockchain built on the Cosmos SDK. REGEN is a staking token, providing Regen Ledger with utility - namely, fees, gas, governance and security.REGENOsmosisWebsite
IXOThe ixo protocol defines a new open standard for producing verifiable claims about changes in the state of the world.
 
IOXOsmosisWebsite
Lend and BorrowKavaKava is a Layer-1 blockchain that combines the speed and interoperability of Cosmos with the developer power of Ethereum.

The Kava Network uses a developer-optimized co-chain architecture. The Ethereum Co-Chain enables support for EVM smart contracts while the Cosmos Co-Chain enables the lightning-fast Tendermint consensus engine and the Inter Blockchain Communication Protocol (IBC).
 
KAVABinanceWebsite
Social MediaDesmos NetworkA blockchain which serves as the backbone to empower the development of user-centric social networks.DSMOsmosisWebsite
Data OraclesMicrotickDatapace is Blockchain powered data marketplace with technical and policy-based data verification, and access to the worldwide network of sensors.TICKOsmosisWebsite
FoamFOAM's mission is to build a consensus driven map of the world, empowering a fully decentralized web3 economy with verifiable location data. FOAM incentivizes the infrastructure needed for privacy-preserving and fraud-proof location verification. The starting point for FOAM is the FOAM Map, where a community of Cartographers curate geographic Points of Interest on the FOAM map. FOAMPoloniexWebsite
VPNSentinelSentinel (DVPN) is a cryptocurrency and operates on the Cosmos platform.DVPNMEXCWebsite
PaymentBitcannaBitCanna aims to become the global digital ancillary platform for the cannabis industry. The focus for the team lies on building an application that will serve both businesses as consumers from within the industry. Blockchain is the means as an infrastructure to build this application on top.
 
BCNAHotbitWebsite
DappCrypto com CROBinanceWebsite
CeFi & DeFiComdexComdex is a DeFi infrastructure layer for the Cosmos ecosystem. Comdex provides a variety of interoperable plug & play modules for projects to use to create their own DeFi platforms providing utility to the Cosmos community as well as DeFi users worldwide.CMDXOsmosisWebsite
Kira NetworkKIRA is a Layer 1 network enabling market access to any digital asset in the cryptocurrency ecosystem. Users can earn block and fee rewards from staking any digital asset on multiple chains at the same time, while maintaining full liquidity and custody over their funds, whether trading on KIRA or using other DeFi apps simultaneously.
 
KEXGateWebsite
KI ChainBridging CeFi with DeFi Block by Block.  Website
NFTBitsongBitSong is a distributed (open source) blockchain music ecosystem born in December 2017, to create a decentralized and trustless hub that interconnects the various market players.

Artists, Fans, Managers and Labels in One Single Holistic Ecosystem: $BTSG. Earn real-time royalties, discover exclusive content, mint and trade fan tokens, buy & sell NFTs.
BTSGOsmosisWebsite
StargazeStargaze is a decentralized and community-owned network for NFTs. It is built as an app-specific Cosmos Proof-of_stake chain, running the Tendermint consensus engine. It’s goal is to be similar to OpenSea, except governed by a community via a curation DAO and a protocol DAO.

Stargaze will allow users to buy, sell, and trade NFTs. It will also allow trading NFTs across other IBC-enabled chains. It will also interoperate with Ethereum over Gravity Bridge.
STARSOsmosisWebsite
OmniflixDecentralized media and network layer for Creators & Sovereign Communities powered by NFTs and related distribution protocols.  Website
Pylons techWe believe that distributed consensus will power new forms of individual and corporate expression — leading to enhanced community interactions. Built on Cosmos, Pylons is a fast and interoperable system for brands and creators to build engaging products with meaningful NFT experiences.  Website
Web 3LikeCoinLikeCoin (LIKE) is the native token of the LikeCoin chain built from the Cosmos SDK. LikeCoin is a inter-chain protocol and framework for decentralized publishing. It is an application-specific blockchain for building and bridging media to Web 3. LIKEOsmosisWebsite
BostromDecentralized web 3.0 search engineBOOTOsmosisWebsite
BluzelleBluzelle delivers high security, un-matched availability, and is censorship resistant. Whether you are an artist, musician, scientist, publisher, or developer, Bluzelle protects the intellectual property of all creators. Bluzelle is data storage, file storage, oracles, and more. Its is specific for NFTs and DeFi.BLZBinanceWebsite
Cosmos WalletKeplrKeplr Wallet for the Cosmos Ecosystem  Website
CosmostationCosmos Wallet and Enterprise-level Proof-of-Stake validator node operation & end-user applications.  Website

Conclusions:

  • The Cosmos ecosystem experienced strong growth in 2021. The application-specific blockchain architecture is gaining popularity within the industry. While these trends are very encouraging, from an investment standpoint, it is not clear exactly who value will accrue to within the ecosystem.
  • Although there are now a plethora of EVM blockchains, EVMos is uniquely positioned to integrate the Ethereum and Cosmos ecosystems. It will be interesting to see how the dApp store model in EVMos’ tokenomics manifests into developer activity.
  • The recent Wormhole (a bridge between Ethereum and Solana) smart contract hack has raised a lot of questions as to the viability of cross-chain integration. EVMos has partnered with Nomad and Connext to bridge assets between Ethereum and Cosmos. Security of these bridges will be paramount for successful integration.
  • The CEVMos modular architecture breaks the blockchain into its three core functions, specializing for each. While still in development (Celestia has not yet launched testnet), the partnership is extremely promising, and could establish a new industry paradigm.

I hope this article will help you. Don't forget to leave a like, comment and sharing it with others. Thank you!

Read more: Ethereum Ecosystem Overview | Top 200 Project Built on Ethereum (ETH)

#blockchain #bitcoin #cryptocurrency #cosmos #atom 

Cosmos Ecosystem Overview | Top 100 Project Built on Cosmos (ATOM)
Thierry  Perret

Thierry Perret

1653765540

Déployer Des Contrats intelligents Ethereum Sur L'écosystème Cosmos

Beaucoup d'entre nous utilisent des sites comme Facebook pour se connecter avec des amis et des êtres chers, partageant des moments de notre vie en ligne pour qu'ils puissent les voir et y répondre. Cependant, Facebook est seul maître des données stockées sur ses serveurs. Par conséquent, de nombreux utilisateurs ont le sentiment de donner pratiquement à Facebook leurs données personnelles, et Facebook peut choisir de modifier, de restreindre ou d'effacer les données qu'ils partagent.

Cependant, la blockchain et le Web3 résolvent ces problèmes grâce à la décentralisation , retirant effectivement ce pouvoir aux gouvernements et aux organisations, garantissant que la propriété de ces données reste aux utilisateurs.

Dans ce didacticiel, nous explorerons le SDK Cosmos , un framework de blockchain, et nous apprendrons comment déployer des contrats intelligents écrits pour Ethereum sur la blockchain Cosmos. Commençons!

Cosmos

Cosmos est un SDK utilisé dans la construction d'une blockchain. Avec Cosmos, nous pouvons écrire notre blockchain personnalisée, tester la blockchain dans un testnet, lancer la blockchain sur un réseau principal et nous connecter à d'autres blockchains Cosmos.

Cosmos est open source, ce qui signifie que le SDK est créé et maintenu par la communauté des développeurs Cosmos. Écrit dans le langage de programmation Go , Cosmos est modulaire, évolutif et interopérable avec d'autres blockchains Cosmos.

Déployez des contrats intelligents sur Cosmos

Vous pouvez déployer des contrats intelligents écrits en Solidity sur la blockchain Cosmos, y compris les jetons ERC-20. Par conséquent, vous pouvez déployer les mêmes contrats intelligents que vous avez écrits pour la blockchain Ethereum sur la blockchain Cosmos.

Dans cette section, nous allons apprendre à déployer des contrats intelligents sur la blockchain Cosmos en déployant sur Evmos . Evmos est une blockchain évolutive construite à l'aide du SDK Cosmos qui s'exécute sur le moteur de consensus Tendermint Core .

Evmos est compatible avec EVM et Web3, a des transactions rapides et implémente Tendermint Core. Nous allons écrire notre contrat intelligent en utilisant Truffle , mais nous devons d'abord installer l'outil utilitaire Truffle.

Créer un projet Truffe

Installez l'outil Truffle en exécutant la commande suivante :

npm install -g truffle

Pour créer un nouveau projet Truffle, exécutez la commande suivante :

mkdir cosmoprj
cd cosmoprj
truffle init

Notre projet aura la structure suivante :

cosmoprj/
├── /contracts
├─── /Migrations.sol
├── /migrations
├─── /1_initial_migration.js
├── /test
├── package.json
└── truffle-config.js
  • migrations/: Contient nos scripts de migration
  • contracts/: Contient nos contrats intelligents
  • package.json: Contient nos dépendances
  • truffle-config.js: Contient notre configuration Truffe
  • test/: Contient nos scripts de test

Créer un Hellocontrat intelligent

Nous allons créer un contrat intelligent appelé Helloqui imprimera le message Hello World. Exécutez la commande ci-dessous pour créer un Hellofichier de contrat :

truffle create contract Hello

Maintenant, nous allons voir un Hello.solfichier dans notre contractsdossier. Ouvrez le fichier et ajoutez le code suivant :

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

contract Hello {
  function sayHello() public pure returns (string memory)  {
    return "Hello, world!";
  }
}

Nous avons une fonction appelée sayHelloqui renvoie une chaîne. Le mot- publicclé signifie que cette fonction peut être appelée par n'importe qui, et le mot- pureclé signifie que la fonction ne modifiera aucun état.

Ajouter la configuration Evmos

Maintenant, nous allons déployer notre contrat intelligent sur Evmos Testnet. Evmos propose de nombreux réseaux de test que nous pouvons utiliser, mais pour ce didacticiel, nous utiliserons le réseau de Evmos Testnettest. Nous allons configurer ce testnet dans notre truffle-config.jsfichier :

const HDWalletProvider = require("@truffle/hdwallet-provider");

const mnemonic =
  "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";

module.exports = {
  networks: {
    evmos: {
      provider: () =>
        new HDWalletProvider(mnemonic, "https://eth.bd.evmos.dev:8545"),
      network_id: 9000,
      chain_id: 9000,
    },
  },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  },

  // Configure your compilers
  compilers: {
    solc: {
      version: "0.8.13", // Fetch exact
    },
  },
};

Nous avions besoin du @truffle/hdwallet-providerpackage, qui nous permet de nous connecter au Evmos Testnet. Le @truffle/hdwallet-providerpackage est également un fournisseur Web3 compatible avec le portefeuille HD utilisé pour signer des transactions pour des adresses dérivées d'un mnémonique de 12 mots. La mnemonicvariable est le mnémonique de 12 mots que nous avons utilisé pour générer notre clé privée et à partir duquel nos adresses sont générées.

Nous transmettons "https://eth.bd.evmos.dev:8545"comme URL du fournisseur, qui est l'URL du Evmos Testnet.

Le network_idest l'ID du réseau auquel nous nous connectons, et le chain_idest l'ID de la chaîne à laquelle nous nous connectons. Nous utilisons la solcpropriété pour configurer le compilateur Solidity ; nous utilisons la version  0.8.13.

Ensuite, installons le @truffle/hdwallet-providerpackage :

npm install --save @truffle/hdwallet-provider

Compilation de notre contrat intelligent

Compilons notre contrat intelligent en utilisant la truffle compilecommande :

compilation de truffes

truffle compile

Nous verrons qu'un nouveau builddossier a été généré, qui contient le contrat intelligent compilé. Le contrat intelligent compilé est stocké dans le build/contractsdossier.

Dans le dossier, nous verrons Hello.jsonet Migrations.json. Ces fichiers constituent le contrat intelligent compilé et contiennent l'ABI et le bytecode du contrat intelligent.

Déployez notre contrat intelligent

Une fois cela terminé, nous pouvons déployer notre contrat intelligent. Nous utiliserons la truffle migratecommande :

truffle migrate --network evmos

Le code ci-dessus déploiera notre contrat intelligent sur Evmos Testnet. Voyez que nous avons utilisé le --networkdrapeau pour spécifier le réseau que nous voulons déployer, dans notre cas, le evmosréseau. Nous verrons ce qui suit dans notre console :

Notre numéro de bloc est 805055, qui est le numéro de bloc de la transaction qui a été exécutée. Nous utiliserons ce numéro de bloc pour interroger le contrat intelligent.

Voyons ce bloc dans l'Evm Explorer https://evm.evmos.dev/blocks/805055:

Conclusion

L'un des avantages de Cosmos et d'Evmos est qu'ils sont tous deux compatibles avec la blockchain Ethereum. Nous pouvons porter nos contrats intelligents sur la blockchain Cosmos et les déployer facilement sur Evmos Testnet sans aucune configuration.

Dans cet article, nous avons appris ce qu'est Cosmos et examiné comment créer un contrat intelligent à l'aide de Truffle. Enfin, nous avons appris à déployer notre contrat intelligent sur le testnet Evmos. J'espère que cet article vous a plu, bon codage !

Lien : https://blog.logrocket.com/deploy-ethereum-smart-contracts-cosmos-ecosystem/

#cosmos #ethereum #smartcontract 

Déployer Des Contrats intelligents Ethereum Sur L'écosystème Cosmos
坂本  篤司

坂本 篤司

1653746520

コスモスエコシステムにイーサリアムスマートコントラクトをデプロイする

私たちの多くは、Facebookのようなサイトを使用して友人や愛する人とつながり、オンラインで私たちの生活の瞬間を共有して、彼らが見て応答できるようにしています。ただし、Facebookはサーバーに保存されているデータを単独で管理しています。したがって、多くのユーザーは、Facebookに個人データを実際に提供していると感じており、Facebookは、共有するデータを編集、制限、またはワイプすることを選択できます。

ただし、ブロックチェーンとWeb3は分散化によってこれらの問題を解決し、政府や組織からこの権限を効果的に取り除き、このデータの所有権がユーザーに残るようにします。

このチュートリアルでは、ブロックチェーンフレームワークであるCosmos SDKについて説明し、Ethereum用に作成されたスマートコントラクトをCosmosブロックチェーンにデプロイする方法を学習します。始めましょう!

宇宙

Cosmosは、ブロックチェーンの構築に使用されるSDKです。Cosmosを使用すると、カスタムブロックチェーンを作成し、テストネットでブロックチェーンをテストし、メインネットでブロックチェーンを起動し、他のCosmosブロックチェーンに接続できます。

Cosmosはオープンソースです。つまり、SDKはCosmos開発者コミュニティによって構築および保守されています。Goプログラミング言語で記述されたCosmosは、モジュール式でスケーラブルであり、他のCosmosブロックチェーンと相互運用可能です。

Cosmosにスマートコントラクトをデプロイする

Solidityで記述されたスマートコントラクトを、ERC-20トークンを含むCosmosブロックチェーンにデプロイできます。したがって、Ethereumブロックチェーン用に作成したのと同じスマートコントラクトをCosmosブロックチェーンにデプロイできます。

このセクションでは、Evmosにデプロイすることにより、Cosmosブロックチェーンにスマートコントラクトをデプロイする方法を学習します。Evmosは、TendermintCoreコンセンサスエンジンで実行されるCosmosSDKを使用して構築されたスケーラブルなブロックチェーンです。

EvmosはEVMおよびWeb3と互換性があり、トランザクションが高速で、TendermintCoreを実装しています。Truffleを使用してスマートコントラクトを作成しますが、最初に、Truffleユーティリティツールをインストールする必要があります。

Truffleプロジェクトを作成する

次のコマンドを実行して、Truffleツールをインストールします。

npm install -g truffle

新しいTruffleプロジェクトを作成するには、次のコマンドを実行します。

mkdir cosmoprj
cd cosmoprj
truffle init

私たちのプロジェクトは次のような構造になります。

cosmoprj/
├── /contracts
├─── /Migrations.sol
├── /migrations
├─── /1_initial_migration.js
├── /test
├── package.json
└── truffle-config.js
  • migrations/:移行スクリプトが含まれています
  • contracts/:スマートコントラクトが含まれています
  • package.json:依存関係が含まれています
  • truffle-config.js:Truffle構成が含まれています
  • test/:テストスクリプトが含まれています

スマートコントラクトを作成するHello

Helloメッセージを出力するというスマートコントラクトを作成しますHello World。以下のコマンドを実行して、コントラクトHelloファイルを作成します。

truffle create contract Hello

これで、フォルダにHello.solファイルが表示されcontractsます。ファイルを開き、次のコードを追加します。

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

contract Hello {
  function sayHello() public pure returns (string memory)  {
    return "Hello, world!";
  }
}

sayHello文字列を返すという関数があります。キーワードは、このpublic関数を誰でも呼び出すことができることをpure意味し、キーワードは、関数が状態を変更しないことを意味します。

Evmos構成を追加する

次に、スマートコントラクトをEvmosTestnetにデプロイします。Evmosには、使用できる多くのテストEvmos Testnetネットが用意されていますが、このチュートリアルでは、テストネットを使用します。このテストネットをtruffle-config.jsファイルで構成します。

const HDWalletProvider = require("@truffle/hdwallet-provider");

const mnemonic =
  "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";

module.exports = {
  networks: {
    evmos: {
      provider: () =>
        new HDWalletProvider(mnemonic, "https://eth.bd.evmos.dev:8545"),
      network_id: 9000,
      chain_id: 9000,
    },
  },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  },

  // Configure your compilers
  compilers: {
    solc: {
      version: "0.8.13", // Fetch exact
    },
  },
};

@truffle/hdwallet-providerEvmosTestnetに接続できるパッケージが必要でした。この@truffle/hdwallet-providerパッケージは、12ワードのニーモニックから派生したアドレスのトランザクションに署名するために使用されるHDウォレット対応のWeb3プロバイダーでもあります。変数は、mnemonic秘密鍵の生成に使用した12ワードのニーモニックであり、そこからアドレスが生成されます。

"https://eth.bd.evmos.dev:8545"EvmosTestnetのURLであるプロバイダーURLとして渡します。

network_id接続しているネットワークのIDであり、は接続してchain_idいるチェーンのIDです。このプロパティを使用してsolc、Solidityコンパイラを構成します。バージョンを使用しています 0.8.13

次に、@truffle/hdwallet-providerパッケージをインストールしましょう。

npm install --save @truffle/hdwallet-provider

スマートコントラクトのコンパイル

truffle compileコマンドを使用してスマートコントラクトをコンパイルしましょう:

truffle compile

buildコンパイルされたスマートコントラクトを含む新しいフォルダーが生成されたことがわかります。コンパイルされたスマートコントラクトはbuild/contractsフォルダーに保存されます。

フォルダ内にとが表示Hello.jsonされMigrations.jsonます。これらのファイルはコンパイルされたスマートコントラクトであり、ABIとスマートコントラクトのバイトコードが含まれています。

スマートコントラクトを展開する

これが完了すると、スマートコントラクトを展開できます。truffle migrate次のコマンドを使用します。

truffle migrate --network evmos

上記のコードは、スマートコントラクトをEvmosTestnetにデプロイします。--networkフラグを使用して、展開先のネットワーク(この場合はネットワーク)を指定したことを確認してくださいevmos。コンソールに次のように表示されます。

ブロック番号は805055、実行されたトランザクションのブロック番号です。このブロック番号を使用して、スマートコントラクトを照会します。

このブロックをEvmExplorerで表示してみましょうhttps://evm.evmos.dev/blocks/805055

結論

CosmosとEvmosの両方の利点は、両方ともイーサリアムブロックチェーンと互換性があることです。スマートコントラクトをCosmosブロックチェーンに移植し、構成なしでEvmosTestnetに簡単にデプロイできます。

この記事では、Cosmosとは何かを学び、Truffleを使用してスマートコントラクトを作成する方法を確認しました。最後に、スマートコントラクトをEvmosTestnetにデプロイする方法を学びました。この記事を楽しんでいただければ幸いです。コーディングを楽しんでください。

ソース:https ://blog.logrocket.com/deploy-ethereum-smart-contracts-cosmos-ecosystem/

 #ethereum #smartcontract #cosmos 

コスモスエコシステムにイーサリアムスマートコントラクトをデプロイする
Saul  Alaniz

Saul Alaniz

1653746400

Implemente Contratos Inteligentes De Ethereum En El Ecosistema Cosmos

Muchos de nosotros usamos sitios como Facebook para conectarnos con amigos y seres queridos, compartiendo momentos de nuestras vidas en línea para que los vean y respondan. Sin embargo, Facebook tiene el control exclusivo de los datos almacenados en sus servidores. Por lo tanto, muchos usuarios sienten que prácticamente le están dando a Facebook sus datos personales, y Facebook puede optar por editar, restringir o borrar los datos que comparten.

Sin embargo, blockchain y Web3 resuelven estos problemas a través de la descentralización , eliminando efectivamente este poder de los gobiernos y organizaciones, asegurando que la propiedad de estos datos permanezca con los usuarios.

En este tutorial, exploraremos el SDK de Cosmos , un marco de blockchain, y aprenderemos a implementar contratos inteligentes escritos para Ethereum en la blockchain de Cosmos. ¡Empecemos!

Cosmos

Cosmos es un SDK utilizado en la construcción de una cadena de bloques. Con Cosmos, podemos escribir nuestra cadena de bloques personalizada, probar la cadena de bloques en una red de prueba, lanzar la cadena de bloques a una red principal y conectarnos a otras cadenas de bloques de Cosmos.

Cosmos es de código abierto, lo que significa que la comunidad de desarrolladores de Cosmos crea y mantiene el SDK. Escrito en el lenguaje de programación Go , Cosmos es modular, escalable e interoperable con otras cadenas de bloques de Cosmos.

Implementar contratos inteligentes en Cosmos

Puede implementar contratos inteligentes escritos en Solidity en la cadena de bloques Cosmos, incluidos los tokens ERC-20. Por lo tanto, puede implementar los mismos contratos inteligentes que escribió para la cadena de bloques Ethereum en la cadena de bloques Cosmos.

En esta sección, aprenderemos cómo implementar contratos inteligentes en la cadena de bloques de Cosmos mediante la implementación en Evmos . Evmos es una cadena de bloques escalable creada con Cosmos SDK que se ejecuta en el motor de consenso Tendermint Core .

Evmos es compatible con EVM y Web3, tiene transacciones rápidas e implementa Tendermint Core. Escribiremos nuestro contrato inteligente usando Truffle , pero primero, tenemos que instalar la herramienta de utilidad Truffle.

Crear un proyecto de Trufa

Instale la herramienta Truffle ejecutando el siguiente comando:

npm install -g truffle

Para crear un nuevo proyecto de Trufa, ejecute el siguiente comando:

mkdir cosmoprj
cd cosmoprj
truffle init

Nuestro proyecto tendrá la siguiente estructura:

cosmoprj/
├── /contracts
├─── /Migrations.sol
├── /migrations
├─── /1_initial_migration.js
├── /test
├── package.json
└── truffle-config.js
  • migrations/: Contiene nuestros scripts de migración
  • contracts/: Contiene nuestros contratos inteligentes
  • package.json: Contiene nuestras dependencias
  • truffle-config.js: Contiene nuestra configuración de Trufa
  • test/: Contiene nuestros scripts de prueba

Crear un Hellocontrato inteligente

Crearemos un contrato inteligente llamado Helloque imprimirá el mensaje Hello World. Ejecute el siguiente comando para crear un Helloarchivo de contrato:

truffle create contract Hello

Ahora, veremos un Hello.solarchivo en nuestra contractscarpeta. Abra el archivo y agregue el siguiente código:

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

contract Hello {
  function sayHello() public pure returns (string memory)  {
    return "Hello, world!";
  }
}

Tenemos una función llamada sayHelloque devuelve una cadena. La publicpalabra clave significa que cualquiera puede llamar a esta función, y la purepalabra clave significa que la función no modificará ningún estado.

Agregar configuración de Evmos

Ahora, implementaremos nuestro contrato inteligente en Evmos Testnet. Evmos ofrece muchas redes de prueba que podemos usar, pero para este tutorial, usaremos la red de Evmos Testnetprueba. Configuraremos esta testnet en nuestro truffle-config.jsarchivo:

const HDWalletProvider = require("@truffle/hdwallet-provider");

const mnemonic =
  "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";

module.exports = {
  networks: {
    evmos: {
      provider: () =>
        new HDWalletProvider(mnemonic, "https://eth.bd.evmos.dev:8545"),
      network_id: 9000,
      chain_id: 9000,
    },
  },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  },

  // Configure your compilers
  compilers: {
    solc: {
      version: "0.8.13", // Fetch exact
    },
  },
};

Requerimos el @truffle/hdwallet-providerpaquete, que nos permite conectarnos a Evmos Testnet. El @truffle/hdwallet-providerpaquete también es un proveedor Web3 habilitado para billetera HD que se utiliza para firmar transacciones para direcciones derivadas de un mnemotécnico de 12 palabras. La mnemonicvariable es el mnemónico de 12 palabras que usamos para generar nuestra clave privada y desde el cual se generan nuestras direcciones.

Pasamos "https://eth.bd.evmos.dev:8545"como URL del proveedor, que es la URL de Evmos Testnet.

El network_ides el ID de la red a la que nos estamos conectando y el chain_ides el ID de la cadena a la que nos estamos conectando. Usamos la solcpropiedad para configurar el compilador Solidity; estamos usando la versión  0.8.13.

A continuación, instalemos el @truffle/hdwallet-providerpaquete:

npm install --save @truffle/hdwallet-provider

Compilando nuestro contrato inteligente

Compilemos nuestro contrato inteligente usando el truffle compilecomando:

truffle compile

Veremos que buildse generó una nueva carpeta, que contiene el contrato inteligente compilado. El contrato inteligente compilado se almacena en la build/contractscarpeta.

En la carpeta, veremos Hello.jsony Migrations.json. Estos archivos son el contrato inteligente compilado y contienen la ABI y el código de bytes del contrato inteligente.

Implemente nuestro contrato inteligente

Con eso completado, podemos implementar nuestro contrato inteligente. Usaremos el truffle migratecomando:

truffle migrate --network evmos

El código anterior implementará nuestro contrato inteligente en Evmos Testnet. Vea que usamos la --networkbandera para especificar la red que queremos implementar, en nuestro caso, la evmosred. Veremos lo siguiente en nuestra consola:

Nuestro número de bloque es 805055, que es el número de bloque de la transacción que se ejecutó. Usaremos este número de bloque para consultar el contrato inteligente.

Veamos este bloque en el Evm Explorer https://evm.evmos.dev/blocks/805055:

Conclusión

Un beneficio tanto de Cosmos como de Evmos es que ambos son compatibles con la cadena de bloques de Ethereum. Podemos portar nuestros contratos inteligentes a la cadena de bloques Cosmos e implementarlos en Evmos Testnet fácilmente sin ninguna configuración.

En este artículo, aprendimos qué es Cosmos y revisamos cómo crear un contrato inteligente usando Truffle. Finalmente, aprendimos cómo implementar nuestro contrato inteligente en Evmos Testnet. Espero que hayas disfrutado este artículo, ¡feliz codificación!

Fuente: https://blog.logrocket.com/deploy-ethereum-smart-contracts-cosmos-ecosystem/

#ethereum #smartcontract #cosmos 

Implemente Contratos Inteligentes De Ethereum En El Ecosistema Cosmos

How to Deploy Ethereum Smart Contracts on The Cosmos Ecosystem

Many of us use sites like Facebook to connect with friends and loved ones, sharing moments of our lives online for them to see and respond to. However, Facebook is in sole control of the data stored on its servers. Therefore, many users feel that they are practically giving Facebook their personal data, and Facebook can choose to edit, restrict, or wipe the data they share.

However, the blockchain and Web3 solve these problems through decentralization, effectively removing this power from governments and organizations, ensuring that ownership of this data remains with the users.

In this tutorial, we’ll explore the Cosmos SDK, a blockchain framework, and we’ll learn how to deploy smart contracts written for the Ethereum to the Cosmos blockchain. Let’s get started!

Cosmos

Cosmos is an SDK used in building a blockchain. With Cosmos, we can write our custom blockchain, test the blockchain in a testnet, launch the blockchain to a mainnet, and connect to other Cosmos blockchains.

Cosmos is open source, meaning that the SDK is built and maintained by the Cosmos developer community. Written in the Go programming language, Cosmos is modular, scalable, and interoperable with other Cosmos blockchains.

Deploy smart contracts on Cosmos

You can deploy smart contracts written in Solidity on the Cosmos blockchain, including ERC-20 tokens. Therefore, you can deploy the same smart contracts that you wrote for the Ethereum blockchain on the Cosmos blockchain.

In this section, we’ll learn how to deploy smart contracts on the Cosmos blockchain by deploying to Evmos. Evmos is a scalable blockchain built using the Cosmos SDK that runs on the Tendermint Core consensus engine.

Evmos is compatible with EVM and Web3, has fast transactions, and implements the Tendermint Core. We’ll write our smart contract using Truffle, but first, we have to install the Truffle utility tool.

Create a Truffle project

Install the Truffle tool by running the following command:

npm install -g truffle

To create a new Truffle project, run the following command:

mkdir cosmoprj
cd cosmoprj
truffle init

Install Truffle Code

Truffle Install Success

Our project will have the following structure:

cosmoprj/
├── /contracts
├─── /Migrations.sol
├── /migrations
├─── /1_initial_migration.js
├── /test
├── package.json
└── truffle-config.js
  • migrations/: Contains our migration scripts
  • contracts/: Contains our smart contracts
  • package.json: Contains our dependencies
  • truffle-config.js: Contains our Truffle configuration
  • test/: Contains our test scripts

Create a Hello smart contract

We’ll create a smart contract called Hello that will print the message Hello World. Run the command below to create a contract Hello file:

truffle create contract Hello

Now, we’ll see a Hello.sol file in our contracts folder. Open the file and add the following code:

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

contract Hello {
  function sayHello() public pure returns (string memory)  {
    return "Hello, world!";
  }
}

We have a function called sayHello that returns a string. The public keyword means that this function can be called by anyone, and the pure keyword means that the function will not modify any state.

Add Evmos configuration

Now, we’ll deploy our smart contract to the Evmos Testnet. Evmos offers many testnets that we can use, but for this tutorial, we’ll use the Evmos Testnet testnet. We’ll configure this testnet in our truffle-config.js file:

const HDWalletProvider = require("@truffle/hdwallet-provider");

const mnemonic =
  "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";

module.exports = {
  networks: {
    evmos: {
      provider: () =>
        new HDWalletProvider(mnemonic, "https://eth.bd.evmos.dev:8545"),
      network_id: 9000,
      chain_id: 9000,
    },
  },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  },

  // Configure your compilers
  compilers: {
    solc: {
      version: "0.8.13", // Fetch exact
    },
  },
};

We required the @truffle/hdwallet-provider package, which allows us to connect to the Evmos Testnet. The @truffle/hdwallet-provider package is also an HD wallet-enabled Web3 provider used to sign transactions for addresses derived from a 12-word mnemonic. The mnemonic variable is the 12-word mnemonic that we used to generate our private key and from which our addresses are generated.

We pass "https://eth.bd.evmos.dev:8545" as the provider URL, which is the URL of the Evmos Testnet.

The network_id is the ID of the network that we are connecting to, and the chain_id is the ID of the chain that we are connecting to. We use the solc property to configure the Solidity compiler; we’re using version 0.8.13.

Next, let’s install the @truffle/hdwallet-provider package:

npm install --save @truffle/hdwallet-provider

Compiling our smart contract

Let’s compile our smart contract using the truffle compile command:

truffle compile

truffle compile

We’ll see that a new build folder was generated, which contains the compiled smart contract. The compiled smart contract is stored in the build/contracts folder.

In the folder, we’ll see Hello.json and Migrations.json. These files are the compiled smart contract, and they contain the ABI and the bytecode of the smart contract.

Deploy our smart contract

With that completed, we can deploy our smart contract. We’ll use the truffle migrate command:

truffle migrate --network evmos

The code above will deploy our smart contract to the Evmos Testnet. See that we used the --network flag to specify the network that we want to deploy to, in our case, the evmos network. We’ll see the following in our console:

Connect Evmos Truffle Smart Contract

Evmos Block Number Output

Our block number is 805055, which is the block number of the transaction that was executed. We’ll use this block number to query the smart contract.

Let’s view this block in the Evm Explorer https://evm.evmos.dev/blocks/805055:

Evmos Explorer Block Number View

Evmos Explorer Block Details ContEvmos Explorer Block Detail

Conclusion

A benefit of both Cosmos and Evmos is that thay are both compatible with the Ethereum blockchain. We can port our smart contracts to the Cosmos blockchain and deploy them to the Evmos Testnet easily without any configuration.

In this article, we learned what Cosmos is and reviewed how to create a smart contract using Truffle. Finally, we learned how to deploy our smart contract to the Evmos Testnet. I hope you enjoyed this article, happy coding!

Link: https://blog.logrocket.com/deploy-ethereum-smart-contracts-cosmos-ecosystem/

#cosmos #ethereum #smartcontract 

How to Deploy Ethereum Smart Contracts on The Cosmos Ecosystem
Best of Crypto

Best of Crypto

1647441420

Awesome Cosmos: Collection Of Cosmos Related Resources

Awesome Cosmos

The Cosmos SDK is a framework for building blockchain applications in Golang. Cosmos SDK is being used to build Gaia, the first implementation of the Cosmos Hub.

Contributing

Please read the Contributing guide. Thank you to all our contributors

Contents

Resources

Wallets

Vanity Address Generators

Client Libraries

Go

  • Starport - For Cosmos SDK blockchain development. Bootstraps a new Cosmos SDK blockchain with UI and allows to work conviniently with modules and types.

Javascript

Python

  • cosmospy - Tools for Cosmos wallet management and offline transaction signing

Rust Ecosystem

Core

Bridges

Application Frameworks

Applications

Block Explorers

Validator Profiles

Modules

If you are working on a module that you would like to be used by the community, add it here.

Core

External

Validator Monitoring

Frameworks

Virtual Machines

These are modules or frameworks for virtual machines which run within the Cosmos SDK

Ecosystem

Projects built using the Cosmos SDK

Articles

Disclaimer: This is a community led repo, it does not reflect the views of All In Bits (Tendermint Inc.)

Related

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/awesome
License: Apache-2.0 License

#blockchain  #cosmos  #cryptocurrencies  #go  #golang #rust 

Awesome Cosmos: Collection Of Cosmos Related Resources
Best of Crypto

Best of Crypto

1647433980

Admin Blockchain: Built using Cosmos SDK and Tendermint

admin

admin is a blockchain built using Cosmos SDK and Tendermint and created with Starport v0.17.0.

Development, features

start (variant 1)

  • make build
  • make local-clean
  • make local-init
  • make local-start

start (variant 2)

  • make .get-starport
  • make local-clean
  • make local-keys
  • bin/starport chain serve -v -c config.yml

scenarios

  • curl -X GET "http://localhost:1317/cosmos/adminmodule/adminmodule/admins" -H "accept: application/json"
  • bin/admin-moduled keys list --home ~/.adminmodule - list of local users
  • bin/admin-moduled tx adminmodule add-admin cosmos13juzz4zxk9l7ajp7ns7vgg2n02fgmue7sz8mty --from cosmos17grwgm99ervyntfq2hva3s02760c5m6qjdzga6 --chain-id adminmoduleteshchain1 --home ~/.adminmodule
  • bin/admin-moduled tx adminmodule delete-admin cosmos13juzz4zxk9l7ajp7ns7vgg2n02fgmue7sz8mty --from cosmos17grwgm99ervyntfq2hva3s02760c5m6qjdzga6 --chain-id adminmoduleteshchain1 --home ~/.adminmodule

Get started

cp config_local.yml.example config_local.yml
starport chain serve --home ~/.adminmodule --config config_local.yml 

serve command installs dependencies, builds, initializes, and starts your blockchain in development.

Configure

Your blockchain in development can be configured with config.yml. To learn more, see the Starport docs.

Launch

To launch your blockchain live on multiple nodes, use starport network commands. Learn more about Starport Network.

Web Frontend

Starport has scaffolded a Vue.js-based web app in the vue directory. Run the following commands to install dependencies and start the app:

cd vue
npm install
npm run serve

The frontend app is built using the @starport/vue and @starport/vuex packages. For details, see the monorepo for Starport front-end development.

Release

To release a new version of your blockchain, create and push a new tag with v prefix. A new draft release with the configured targets will be created.

git tag v0.1
git push origin v0.1

After a draft release is created, make your final changes from the release page and publish it.

Install

To install the latest version of your blockchain node's binary, execute the following command on your machine:

curl https://get.starport.network/cosmos/admin-module@latest! | sudo bash

cosmos/admin-module should match the username and repo_name of the Github repository to which the source code was pushed. Learn more about the install process.

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/composer
License:

 #cosmos  #cryptocurrencies  #go  #golang #typescript #javascript #blockchain 

Admin Blockchain: Built using Cosmos SDK and Tendermint
Best of Crypto

Best of Crypto

1647433620

Cosmos QA Tools: Quickly Setting Up A Local Test Environment

Cosmos QA tools

This repo contains scripts which can be used for quickly setting up a local test environment for any Cosmos based network with n number of nodes and m number of accounts. It installs go if it's not already installed on the system and also installs all the dependencies along with it.

These scripts require a few env variables to be setup first such as:-

export DAEMON_HOME=<path to the home directory which will house the chain data>
export CHAINID=<chain-id of your test environment>
export DENOM=<denom of your token>
export GH_URL=<github url of the repository to clone>
export CHAIN_VERSION=<git tag to build>
export DAEMON=<binary name>
export UPGRADE_NAME=<upgrade name in handler>
export UPGRADE_VERSION=<git tag or branch name with upgrade handler>

For eg:-

export DAEMON_HOME=~/.gaiad
export CHAINID=test
export DENOM=uatom
export GH_URL=https://github.com/cosmos/gaia
export CHAIN_VERSION=v6.0.0
export DAEMON=gaiad
export UPGRADE_NAME=v7.0-upgrade
export UPGRADE_VERSION=v7.0.0

Scripts:-

  1. comsos_multinode.sh:- This script sets up the environment. It takes two arguments from the user. First argument is the number of nodes that need to be setup and the second argument is the number of additional accounts that need to be created. Usage:-\
git clone https://github.com/cosmos/qa-integration.git
cd scripts
chmod +x comsos_multinode.sh
./cosmos_multinode.sh 20 100

This will create a network with 20 validators and 100 additional accounts. If the second argument is not passed, no new additional accounts are created. If no arguments are passed it creates a two node network by default.

2.   multinode_distributions.sh:- This script executes the distribuition mudule txs like withdraw-rewards, withdraw-rewards --commission and withdraw-all-rewards Usage:-

chmod +x multinode_distributions.sh
./multinode_distributions.sh 5

This script takes one argument from the user which specifies the number of validators on which the distribution txs are to be executed. If no argument is passed then it executes on the first two validators by default.

3.   multinode_staking.sh:- This script executes the staking module txs like delegate, redelegate and unbond Usage:-

chmod +x multinode_staking.sh
./multinode_staking.sh 5

This script takes one argument from the user which specifies the number of validators on which the staking txs are to be executed. If no argument is passed then it executes on the first two validators by default.

4.   node_status.sh:- This script displays the latest block height and sync status of the nodes. Usage:-

chmod +x node_status.sh
./node_status.sh 5

This script takes one argument from user which specifies the number of validators for which the status will be displayed. If no argument is passed then it displays the status of the first node.

5.  pause_nodes.sh:- This script pauses the nodes. Usage:-

chmod +x pause_nodes.sh
./pause_nodes.sh 5

This script takes one argument from the user which specifies the number of nodes to pause. If no argument is passed then just the first node will be paused.

6.   resume_nodes.sh:- This script starts the paused nodes. Usage:-

chmod +x resume_nodes.sh
./resume_nodes.sh 5

This script takes one argument from the user which specifies the number of nodes to start back up. If no argument is passed then just the first node is started back up.

7.   shutdown_nodes.sh:- This script shuts down the nodes and removes their respective home directories as well. Usage:-

chmod +x shutdown_nodes.sh
./shutdown_nodes.sh 5

This script takes one argument from the user which specifies the number of nodes to shut down. If no argument is passed then just the first node is shut down.

8.   send_load.sh:- This script creates a load of 10,000 send transactions and floods the network.
Usage:-

chmod +x send_load.sh
./send_load.sh 1 2

This script takes 2 arguments from the user which specifies the account number of to and from addresses. If no argument is passed then first and second address is taken by default.

9.  query_load.sh:- This script floods the network with balance queries, delegation queries and staking queries. It creates a load of 10,000 querires. Usage:-

chmod +x query_load.sh
./query_load.sh

10.   setup_upgrade.sh:- This script creates the necessary folders for cosmovisor. It also builds and places the binaries in the folders depending on the upgrade name. Usage:-

chmod +x setup_upgrade.sh
./setup_upgrade.sh 5

This script takes one argument from the user which specifies the number of nodes on which the setup needs to be completed.

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/qa-integration
License: View license

#blockchain  #cosmos  #cryptocurrencies #shell 

Cosmos QA Tools: Quickly Setting Up A Local Test Environment
Best of Crypto

Best of Crypto

1647426060

Aminojs: Supported in Node.js and Browsers In Cosmos

amino-js

Supported in Node.js and browsers.

Support is planned for Service Workers.

Demo

Documentation

https://cosmos.github.io/amino-js/

All exported functions are documented. Some Amino registered TypeScript interfaces are documented. The codec works as is, but we'll work on adding more TS definitions to improve the developer experience.

Install

Please note that the NPM package name is @tendermint/amino-js rather than @cosmos/amino-js.

Yarn

yarn add @tendermint/amino-js

NPM

npm install --save @tendermint/amino-js

Usage

Encoding decoding of basic values:

import { encodeString, decodeString } from '@tendermint/amino-js';
decodeString(encodeString('hello world'));
// [ "hello world", 12 ]

Encoding/decoding of registered types:

import { marshalTx, unmarshalTx } from '@tendermint/amino-js';

const tx = {
   'type':  'auth/StdTx',
   'value': {
       'msg':        [{
           'type':  'cosmos-sdk/MsgSend',
           'value': {
               'from_address': 'cosmos1h806c7khnvmjlywdrkdgk2vrayy2mmvf9rxk2r',
               'to_address':   'cosmos1z7g5w84ynmjyg0kqpahdjqpj7yq34v3suckp0e',
               'amount':       [{
                   'denom':  'uatom',
                   'amount': '11657995'
               }]
           }
       }],
       'fee':        {
           'amount': [{
               'denom':  'uatom',
               'amount': '5000'
           }],
           'gas':    '200000'
       },
       'signatures': [{
           'pub_key':   {
               'type':  'tendermint/PubKeySecp256k1',
               'value': 'AtQaCqFnshaZQp6rIkvAPyzThvCvXSDO+9AzbxVErqJP'
           },
           'signature': '1nUcIH0CLT0/nQ0mBTDrT6kMG20NY/PsH7P2gc4bpYNGLEYjBmdWevXUJouSE/9A/60QG9cYeqyTe5kFDeIPxQ=='
       }],
       'memo':       '1122672754'
   }
};

const encodedTx = marshalTx(tx);
const decodedTx = unmarshalTx(encodedTx);

Register custom types

To register your own types with Amino, you'll need to add Go structs and interfaces, register them with the codec, compile the Go code with GopherJS, and then rebuild the JS lib.

To keep the compiled output small, the recommended way to do this is to add your Go structs, but strip out methods, private properties, and anything else that you don't plan to marshal to Amino.

This is all (hopefully) less complicated than it sounds.

1. Fork

See FORK.md for instructions.

2. Extend

See EXTEND.md for instructions.

Contributing

amino-js is very new! Questions, feedback, use cases, issues, and code are all very, very welcome.

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/amino-js
License: Apache-2.0 License

#blockchain  #cosmos  #cryptocurrencies #go #node #nodejs #typescript #javascript #golang 

Aminojs: Supported in Node.js and Browsers In Cosmos
Best of Crypto

Best of Crypto

1647418620

Gravity Bridge: A CosmosSDK for Moving Assets on & Off Of EVM Based

Gravity bridge is Cosmos <-> Ethereum bridge designed to run on the Cosmos Hub focused on maximum design simplicity and efficiency.

Gravity can transfer ERC20 assets originating on Ethereum to a Cosmos based chain and back to Ethereum.

The ability to transfer assets originating on Cosmos to an ERC20 representation on Ethereum is coming within a few months.

Status

Gravity bridge is under development and will be undergoing audits soon. Instructions for deployment and use are provided in the hope that they will be useful.

It is your responsibility to understand the financial, legal, and other risks of using this software. There is no guarantee of functionality or safety. You use Gravity entirely at your own risk.

You can keep up with the latest development by watching our public standups feel free to join yourself and ask questions.

  • Solidity Contract
    •  Multiple ERC20 support
    •  Tested with 100+ validators
    •  Unit tests for every throw condition
    •  Audit for assets originating on Ethereum
    •  Support for issuing Cosmos assets on Ethereum
  • Cosmos Module
    •  Basic validator set syncing
    •  Basic transaction batch generation
    •  Ethereum -> Cosmos Token issuing
    •  Cosmos -> Ethereum Token issuing
    •  Bootstrapping
    •  Genesis file save/load
    •  Validator set syncing edge cases
    •  Slashing
    •  Relaying edge cases
    •  Transaction batch edge cases
    •  Support for issuing Cosmos assets on Ethereum
    •  Audit
  • Orchestrator / Relayer
    •  Validator set update relaying
    •  Ethereum -> Cosmos Oracle
    •  Transaction batch relaying
    •  Tendermint KMS support
    •  Audit

The design of Gravity Bridge

  • Trust in the integrity of the Gravity bridge is anchored on the Cosmos side. The signing of fraudulent validator set updates and transaction batches meant for the Ethereum contract is punished by slashing on the Cosmos chain. If you trust the Cosmos chain, you can trust the Gravity bridge operated by it, as long as it is operated within certain parameters.
  • It is mandatory for peg zone validators to maintain a trusted Ethereum node. This removes all trust and game theory implications that usually arise from independent relayers, once again dramatically simplifying the design.

Key design Components

  • A highly efficient way of mirroring Cosmos validator voting onto Ethereum. The Gravity solidity contract has validator set updates costing ~500,000 gas ($2 @ 20gwei), tested on a snapshot of the Cosmos Hub validator set with 125 validators. Verifying the votes of the validator set is the most expensive on chain operation Gravity has to perform. Our highly optimized Solidity code provides enormous cost savings. Existing bridges incur more than double the gas costs for signature sets as small as 8 signers.
  • Transactions from Cosmos to ethereum are batched, batches have a base cost of ~500,000 gas ($2 @ 20gwei). Batches may contain arbitrary numbers of transactions within the limits of ERC20 sends per block, allowing for costs to be heavily amortized on high volume bridges.

Operational parameters ensuring security

  • There must be a validator set update made on the Ethereum contract by calling the updateValset method at least once every Cosmos unbonding period (usually 2 weeks). This is because if there has not been an update for longer than the unbonding period, the validator set stored by the Ethereum contract could contain validators who cannot be slashed for misbehavior.
  • Cosmos full nodes do not verify events coming from Ethereum. These events are accepted into the Cosmos state based purely on the signatures of the current validator set. It is possible for the validators with >2/3 of the stake to put events into the Cosmos state which never happened on Ethereum. In this case observers of both chains will need to "raise the alarm". We have built this functionality into the relayer.

Run Gravity bridge right now using docker

We provide a one button integration test that deploys a full arbitrary validator Cosmos chain and testnet Geth chain for both development + validation. We believe having a in depth test environment reflecting the full deployment and production-like use of the code is essential to productive development.

Currently on every commit we send hundreds of transactions, dozens of validator set updates, and several transaction batches in our test environment. This provides a high level of quality assurance for the Gravity bridge.

Because the tests build absolutely everything in this repository they do take a significant amount of time to run. You may wish to simply push to a branch and have Github CI take care of the actual running of the tests.

To run the test simply have docker installed and run.

bash tests/all-up-test.sh

There are optional tests for specific features

Valset stress changes the validating power randomly 25 times, in an attempt to break validator set syncing

bash tests/all-up-test.sh VALSET_STRESS

Batch stress sends 300 transactions over the bridge and then 3 batches back to Ethereum. This code can do up to 10k transactions but Github Actions does not have the horsepower.

bash tests/all-up-test.sh BATCH_STRESS

Validator out tests a validator that is not running the mandatory Ethereum node. This validator will be slashed and the bridge will remain functioning.

bash tests/all-up-test.sh VALIDATOR_OUT

Developer guide

Solidity Contract

in the solidity folder

Run HUSKY_SKIP_INSTALL=1 npm install, then npm run typechain.

Run npm run evm in a separate terminal and then

Run npm run test to run tests.

After modifying solidity files, run npm run typechain to recompile contract typedefs.

The Solidity contract is also covered in the Cosmos module tests, where it will be automatically deployed to the Geth test chain inside the development container for a micro testnet every integration test run.

Cosmos Module

We provide a standard container-based development environment that automatically bootstraps a Cosmos chain and Ethereum chain for testing. We believe standardization of the development environment and ease of development are essential so please file issues if you run into issues with the development flow.

Go unit tests

These do not run the entire chain but instead test parts of the Go module code in isolation. To run them, go into /module and run make test

To hand test your changes quickly

This method is dictinct from the all up test described above. Although it runs the same components it's much faster when editing individual components.

  1. run ./tests/build-container.sh
  2. run ./tests/start-chains.sh
  3. switch to a new terminal and run ./tests/run-tests.sh
  4. Or, docker exec -it gravity_test_instance /bin/bash should allow you to access a shell inside the test container

Change the code, and when you want to test it again, restart ./tests/start-chains.sh and run ./tests/run-tests.sh.

Explanation:

./tests/build-container.sh builds the base container and builds the Gravity test zone for the first time. This results in a Docker container which contains cached Go dependencies (the base container).

./tests/start-chains.sh starts a test container based on the base container and copies the current source code (including any changes you have made) into it. It then builds the Gravity test zone, benefiting from the cached Go dependencies. It then starts the Cosmos chain running on your new code. It also starts an Ethereum node. These nodes stay running in the terminal you started it in, and it can be useful to look at the logs. Be aware that this also mounts the Gravity repo folder into the container, meaning changes you make will be reflected there.

./tests/run-tests.sh connects to the running test container and runs the integration test found in ./tests/integration-tests.sh

Tips for IDEs:

  • Launch VS Code in /solidity with the solidity extension enabled to get inline typechecking of the solidity contract
  • Launch VS Code in /module/app with the go extension enabled to get inline typechecking of the dummy cosmos chain

Working inside the container

It can be useful to modify, recompile, and restart the testnet without restarting the container, for example if you are running a text editor in the container and would not like it to exit, or if you are editing dependencies stored in the container's /go/ folder.

In this workflow, you can use ./tests/reload-code.sh to recompile and restart the testnet without restarting the container.

For example, you can use VS Code's "Remote-Container" extension to attach to the running container started with ./tests/start-chains.sh, then edit the code inside the container, restart the testnet with ./tests/reload-code.sh, and run the tests with ./tests/integration-tests.sh.

Debugger

To use a stepping debugger in VS Code, follow the "Working inside the container" instructions above, but set up a one node testnet using ./tests/reload-code.sh 1. Now kill the node with pkill gravityd. Start the debugger from within VS Code, and you will have a 1 node debuggable testnet.

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/gravity-bridge
License: Apache-2.0 License

#blockchain  #cosmos  #cryptocurrency #evm #ethereum #POW #erc20 

Gravity Bridge: A CosmosSDK for Moving Assets on & Off Of EVM Based
Best of Crypto

Best of Crypto

1647411060

Gorocksdb: A Go Wrapper for RocksDB in Cosmos

Install

You'll need to build RocksDB v5.16+ on your machine.

After that, you can install gorocksdb using the following command:

CGO_CFLAGS="-I/path/to/rocksdb/include" \
CGO_LDFLAGS="-L/path/to/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd" \
  go get github.com/cosmos/gorocksdb

Please note that this package might upgrade the required RocksDB version at any moment. Vendoring is thus highly recommended if you require high stability.

The embedded CockroachDB RocksDB is no longer supported in gorocksdb.

Exact example of building a cosmos chain on a mac

CGO_CFLAGS="-I/opt/homebrew/Cellar/rocksdb/6.27.3/include" \
CGO_LDFLAGS="-L/opt/homebrew/Cellar/rocksdb/6.27.3/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd -L/opt/homebrew/Cellar/snappy/1.1.9/lib -L/opt/homebrew/Cellar/lz4/1.9.3/lib/ -L /opt/homebrew/Cellar/zstd/1.5.0/lib/"  \
go install -tags rocksdb ./...

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/gorocksdb
License: MIT License

#blockchain  #cosmos  #cryptocurrencies  #go  #golang 

Gorocksdb: A Go Wrapper for RocksDB in Cosmos
Best of Crypto

Best of Crypto

1647403620

Cosmos Hub Mainnet: It's Happening!

Cosmos Hub Mainnet

Overview

The current Gaia Version of the Cosmos Hub mainnet is v6.0.0. To bootstrap a mainnet node, it is possible to sync from V6.0.0 via Quicksync or via State Sync.

For a full set of instructions on boostrapping a mainnet node, see the Hub's Join the Cosmos Hub Mainnet documentation.

However to build a node from scratch a node operator will need to first run v4.2.6 until the node panics at block height 6910000. The node should stop running after the panic, if it does not stop automatically, wait for 5-10 minutes and then kill it manually. Then install the latest version of gaia (v5.0.2) and then begin running the binary agian with the optional flag --x-crisis-skip-assert-invariants. This will begin syncing the node since the last upgrade until it is at the current height.

Quickstart

Preresquisites

  • make & gcc
  • Go 1.16+

Note: Make sure to have all prerequisites installed. See the installation docs for clarification and a detailed set of instructions.

Quicksync

Quicksync.io offers several daily snapshots of the Cosmos Hub with varying levels of pruning (archive 1.4TB, default 540GB, and pruned 265GB). For downloads and installation instructions, visit the Cosmos Quicksync guide.

State Sync

To enable state sync, visit an explorer to get a recent block height and corresponding hash. A node operator can choose any height/hash in the current bonding period, but as the recommended snapshot period is 1000 blocks, it is advised to choose something close to current height - 1000. Set these parameters in the code snippet below <BLOCK_HEIGHT> and <BLOCK_HASH>

For reference, the list of rpc_servers and persistent peers can be found in the cosmos hub chain-registry repo.

# Build gaiad binary and initialize chain
cd $HOME
git clone -b v6.0.0 https://github.com/cosmos/gaia
cd gaiad
make install
gaiad init <custom moniker>

# Prepare genesis file for cosmoshub-4
wget https://github.com/cosmos/mainnet/raw/master/genesis.cosmoshub-4.json.gz
gzip -d genesis.cosmoshub-4.json.gz
mv genesis.cosmoshub-4.json $HOME/.gaia/config/genesis.json

#Set minimum gas price & peers
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uatom"/' app.toml
sed -i 's/persistent_peers = ""/persistent_peers = "6e08b23315a9f0e1b23c7ed847934f7d6f848c8b@165.232.156.86:26656,ee27245d88c632a556cf72cc7f3587380c09b469@45.79.249.253:26656,538ebe0086f0f5e9ca922dae0462cc87e22f0a50@34.122.34.67:26656,d3209b9f88eec64f10555a11ecbf797bb0fa29f4@34.125.169.233:26656,bdc2c3d410ca7731411b7e46a252012323fbbf37@34.83.209.166:26656,585794737e6b318957088e645e17c0669f3b11fc@54.160.123.34:26656,5b4ed476e01c49b23851258d867cc0cfc0c10e58@206.189.4.227:26656"/' config.toml

# Configure State sync
cd $HOME/.gaia/config
sed -i 's/enable = false/enable = true/' config.toml
sed -i 's/trust_height = 0/trust_height = <BLOCK_HEIGHT>/' config.toml
sed -i 's/trust_hash = ""/trust_hash = "<BLOCK_HASH>"/' config.toml
sed -i 's/rpc_servers = ""/rpc_servers = "https:\/\/rpc.cosmos.network:443,https:\/\/rpc.cosmos.network:443"/' config.toml

#Start Gaia
gaiad start --x-crisis-skip-assert-invariants

Sync from Scratch

# Build gaiad binary and initialize chain
git clone -b v4.2.1 https://github.com/cosmos/gaia
cd gaia
make install
gaiad init <custom moniker>

# Prepare genesis file for cosmoshub-4
wget https://github.com/cosmos/mainnet/raw/master/genesis.cosmoshub-4.json.gz
gzip -d genesis.cosmoshub-4.json.gz
mv genesis.cosmoshub-4.json ~/.gaia/config/genesis.json


#Set minimum gas price & peers
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uatom"/' app.toml
sed -i 's/persistent_peers = ""/persistent_peers = "6e08b23315a9f0e1b23c7ed847934f7d6f848c8b@165.232.156.86:26656,ee27245d88c632a556cf72cc7f3587380c09b469@45.79.249.253:26656,538ebe0086f0f5e9ca922dae0462cc87e22f0a50@34.122.34.67:26656,d3209b9f88eec64f10555a11ecbf797bb0fa29f4@34.125.169.233:26656,bdc2c3d410ca7731411b7e46a252012323fbbf37@34.83.209.166:26656,585794737e6b318957088e645e17c0669f3b11fc@54.160.123.34:26656,5b4ed476e01c49b23851258d867cc0cfc0c10e58@206.189.4.227:26656"/' config.toml

gaiad start --x-crisis-skip-assert-invariants

Now wait until the chain reaches block height 6910000. It will panic and log the following:

ERR UPGRADE "Gravity-DEX" NEEDED at height: 6910000: v5.0.0-4760cf1f1266accec7a107f440d46d9724c6fd08

panic: UPGRADE "Gravity-DEX" NEEDED at height: 6910000: v5.0.0-4760cf1f1266accec7a107f440d46d9724c6fd08

It's now time to perform the manual Delta upgrade:

git checkout -b v5.0.2
make install
gaiad start --x-crisis-skip-assert-invariants

Once V5 reaches the upgrade block height, the chain will halt and display the following message:

ERR UPGRADE "Vega" NEEDED at height: 8695000

This will indicate it is time to perform the Vega upgrade. Similar with the previous upgrade, checkout V6, compile the new binary and restart gaiad

git checkout -b v6.0.0
make install
gaiad start --x-crisis-skip-assert-invariants

NOTE: If the node is unable to connect to any of the seeds listed here, find additional seeds and peers in this document maintained by community members, and at Atlas, which is automatically generated by crawling the network. Additionally, node operators can just copy Quicksync's addressbook and move it to $HOME/.gaia/config/addrbook.json

Upgrade to Validator Node

You now have an active full node. What's the next step? You can upgrade your full node to become a Cosmos Validator. The top 125 validators have the ability to propose new blocks to the Cosmos Hub. Continue onto the Validator Setup.

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/mainnet
License:

#blockchain  #cosmos  #cryptocurrencies #mainnet #go  #golang 

Cosmos Hub Mainnet: It's Happening!
Best of Crypto

Best of Crypto

1647396120

Cosmoshub Multisig App built with Cosmjs, Next.js, FaunaDB and Vercel

This app allows for multisig users to create, sign and broadcast transactions on any stargate enabled chain. It's built with Cosmjs, Next.js, FaunaDB and Vercel.

The app is live here.

Here is a user guide on how to use the app

Running your own instance

1. Clone project / setup Vercel deployment

This app uses Vercel for deployment and hosting, since they support next.js's serverless functions. You will need a vercel account to deploy this app. Use the button below to one-click clone and deploy this repo. The initial deployment will fail until all the necessary environment variables are input from the following steps.

2. Setup environment variables

In the Vercel control panel for your new app, go to Settings -> Environment Variables and add in the keys and values from this repo's .env.sample file. The only remaining variable should be the FAUNADB_SECRET, which will be available once you setup your FaunaDB instance.

3. Initializing FaunaDB

This app relies on FaunaDB as for storing account, transaction and signature details.

  • Create a FaunaDB account
  • Create a new database
    • Use the "Classic" region
  • Click the "Graphql" tab, and import the db-schema.graphql file in the root of this repo
  • Click the "Security" tab, and create a key. Copy that key into your vercel app's environment variables as the FAUNADB_SECRET value

As your instance of the app is used, you can return to the FaunaDB dashboard to view records for any accounts, transactions or signatures.

4. Succesful Deployment

Redeploy the app and it will pickup the new environment variables and should be functioning normally.

Running Locally

1. Setup .env.local file

Copy the .env.sample file and rename it to .env.local

2. Run a local cosmos-sdk Simapp instance

It's recommmended that you make your simapp instance mimic the denomination of cosmoshub-4 (uatom). Put the local address of your node as the value for NEXT_PUBLIC_NODE_ADDRESS in your .env.local file.

A more in depth tutorial on this is coming soon :)

3. Initializing FaunaDB

This app relies on FaunaDB as for storing account, transaction and signature details.

  • Create a FaunaDB account
  • Create a new database
    • Use the "Classic" region
  • Click the "Graphql" tab, and import the db-schema.graphql file in the root of this repo
  • Click the "Security" tab, and create a key. Copy that key into the .env.local file for the FAUNADB_SECRET value

As your instance of the app is used, you can return to the FaunaDB dashboard to view records for any accounts, transactions or signatures created.

3. Run your instance

With the simapp process running, run these commands in another window:

// with node v12.5.0 or later
npm install
npm run dev

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/cosmos-multisig-ui
License: 

#cosmos  #cryptocurrency #javascript 

Cosmoshub Multisig App built with Cosmjs, Next.js, FaunaDB and Vercel
Best of Crypto

Best of Crypto

1647392280

Gravity Delegations Tool in Cosmos Built with Python

Gravity Delegations Tool

Make sure the file is executable

chmod +x gen.py

Use the command as follows:

python3 gen.py

For help try the --help flag:

> python3 gen.py --help
usage: gen.py [-h] [--amount AMOUNT] [--from-address FROM_ADDRESS] [--output-file OUTPUT_FILE]

Delegate to Cosmos Hub validators

optional arguments:
  -h, --help            show this help message and exit
  --amount AMOUNT       Amount to delegate to each
  --from-address FROM_ADDRESS* 
                        Address to send grav from (default new-new-bom)
  --output-file OUTPUT_FILE
                        Filename to write

Default values for the flags are as follows:

  • --amount = 1
  • --from-address = gravity1zk4uwzygs4k2k5cz7y759sxcnv6qt3pd4g3pqq (new-new-bom)
  • --output-file = today's date in format %d-%m-%Y/unsigned.json

Examples:

python gen.py --amount 1000000000000
python gen.py --amount 1000000000000 --from $(gravity keys show new-new-bom -a)
python gen.py --amount 1000000000000 --output-file output/unsigned.json

Download Details:
Author: cosmos
Source Code: https://github.com/cosmos/interchain-security-gravity
License:

#blockchain  #cosmos  #cryptocurrencies #python 

Gravity Delegations Tool in Cosmos Built with Python