Skip to main content

· 3 min read
Luca Auet
Gabriel Gonzalez

PSP22

File: psp22.rs

Functionalities:

  • Metadata: Provides extra information about the token, such as its name and symbol.
  • Mintable: Gives the capability to create new tokens, which increases the total supply.
  • Burnable: Provides the ability to destroy tokens. This action reduces the total supply of the tokens in circulation.
  • Wrapper: This is a wrapper to create a token that is backed by another equivalent token. It comes with methods to deposit and withdraw the underlying token.
  • FlashMint: Allows for a flash loan on the token. In this process, the borrowed amount is minted and then burned after the loan is repaid, all within a single transaction.
  • Pausable: Provides the ability to pause all token transfers. This can be useful in emergency situations or for maintenance.
  • Capped: Allows setting a limit to the total supply when minting tokens. This ensures that the total number of tokens in circulation never exceeds a predefined amount.

PSP34

File: psp34.rs

Functionalities:

  • Metadata: Provides extra information about the token, such as its name and symbol. This helps in identifying and describing the NFT.
  • Mintable: Gives the capability to create new tokens. Since these are NFTs, each minted token is distinct and unique.
  • Burnable: Allows NFT holders to destroy their NFTs. This means removing the NFT from circulation permanently.
  • Enumerable: Assigns a unique number to each NFT. This can be useful for tracking and listing NFTs in order.

PSP37

File: psp37.rs

Functionalities:

  • Batch: Allows you to transfer multiple tokens in a single operation. This can be efficient when you need to distribute tokens to multiple recipients at once.
  • Metadata: Provides extra information about the token, such as its name and symbol. This helps in identifying and describing the token.
  • Mintable: Gives the capability to create new tokens, which increases the total supply. Since this is a multi-token standard, you can mint multiple types of tokens under one contract.
  • Burnable: Provides the ability to destroy tokens. This action reduces the total supply of the tokens in circulation.
  • Enumerable: Assigns a unique number to each token. This can be useful for tracking and listing tokens in order.

Security:

All the 2 standards also have the security options:

  • None: No specific security mechanism is applied. All functions are public.
  • Ownable: The contract has an owner, which is a single account. This account is authorized to perform all privileged actions.
  • Access Control: This allows the implementation of role-based access control mechanisms. Different roles can be defined, and each role can be given specific permissions.
  • Access Control Enumerable: This is an extension of the Access Control mechanism. It allows the implementation of role-based access control mechanisms where each role has a unique identifier. This can be useful for tracking and managing roles in a more granular manner.

· 3 min read
Luca Auet
Gabriel Gonzalez

The world of blockchain technology is vast and ever-evolving. One of the key players in this space is Polkadot, which offers a unique approach to smart contracts. Let's dive into the intricacies of Polkadot's smart contract ecosystem.

What is a Pallet?

In the Polkadot ecosystem, a pallet is a kind of module or a plugin that provides specific functionalities to a blockchain. Think of it as an app on your smartphone. Just as you can add or remove apps to customize your phone, developers can add or remove pallets to customize their blockchain.

The Contract Pallet

The Contract Pallet is a specific pallet in the Polkadot ecosystem that allows for the creation and management of WebAssembly (Wasm) based smart contracts. It's like a specialized app store where developers can deploy and manage their smart contracts.

Advantages of Developing a Contract

Layer of Abstraction: Smart contracts provide a set of instructions that associate with a specific chain address. This is in contrast to a runtime module on a parachain, which represents the entire logic of a chain's state transitions.

Upgradeability: Smart contracts need to be designed with upgradeability in mind.

Permisionless: In most of the parachains supporting the Contract Pallet you're able to deploy any contract you want.

Environment Control: When you build a smart contract, it gets deployed to a target chain with its environment.

Advantages of Wasm Smart Contracts

Language Flexibility: Wasm smart contracts can be written in any language that compiles to WebAssembly. Most important languages today are Ask! and Ink!, but we can build a smart contract framework using any language able to compile to Wasm. This provides developers with a wide range of choices.

Efficiency: Wasm contracts are cached by default, meaning they only need to be deployed once and can be instantiated multiple times, reducing storage load.

What is ink! Language?

ink! is a domain-specific language designed for writing smart contracts in Rust, which then compiles to Wasm code. It lays the foundation for a new smart contract stack that is based on a Wasm virtual machine and is compatible with Substrate chains.

Parachains Supporting ink!/Wasm Smart Contracts

Several parachains in the Polkadot ecosystem support ink!/Wasm smart contracts:

  • Astar Network: Supports dApps with EVM and WASM smart contracts, offering true interoperability.
  • Shiden Network: Acts as a playground for developers, supporting both EVM and WASM environments.
  • Acala: A decentralized finance consortium and infrastructure chain. Its canary network, Karura, is live and supports dApps and smart contracts.
  • Phala: A privacy-preserving cloud compute platform that enables the use of confidential smart contracts on Polkadot.
  • Darwinia: A cross-chain programmable network that is EVM-compatible.

Conclusion

Polkadot's approach to smart contracts offers flexibility, efficiency, and a wide range of tools for developers. Whether you're a seasoned blockchain developer or just starting out, the Polkadot ecosystem provides a robust platform for building innovative dApps and smart contracts.

More inofrmation can be found on: Smart Contracts · Polkadot Wiki

· 2 min read
Luca Auet
Gabriel Gonzalez

The Polkadot ecosystem is vast and ever-evolving, and to ensure its sustainable growth and interoperability, the introduction of standards becomes imperative. This is where Polkadot Standards Proposals (PSP) come into play. PSPs are a series of standards and protocols proposed for the Polkadot ecosystem to ensure a harmonized approach to development and integration.

What are PSPs?

Polkadot Standards Proposals (PSPs) are technical specifications and standards proposed for the Polkadot ecosystem. They are similar to Ethereum's ERCs (Ethereum Request for Comments) and serve as a blueprint for building interoperable and standardized applications, platforms, and tools within the Polkadot network.

The Importance of Standards

Standards play a crucial role in ensuring consistency, interoperability, and compatibility across different platforms and applications. By adhering to a set of predefined standards:

Interoperability: Different applications and platforms can seamlessly interact with each other without any friction. Consistency: Developers have a clear guideline to follow, ensuring uniformity in the applications they build. Efficiency: Standards eliminate the need to reinvent the wheel, allowing developers to build upon existing protocols and specifications. Trust: Users can have confidence in platforms and applications that adhere to recognized standards.

A Closer Look at Specific PSPs

  • PSP-22: This standard is akin to Ethereum's ERC-20, which is a standard for fungible tokens. PSP-22 provides a set of standard APIs for tokens within the Polkadot ecosystem. It defines methods to transfer tokens, retrieve balances of addresses, and other token-related functionalities.

  • PSP-34: PSP-34 is a standard for non-fungible tokens (NFTs) within the Polkadot ecosystem. Similar to Ethereum's ERC-721, it provides a standard interface for NFTs, allowing for the creation, transfer, and querying of NFTs.

  • PSP-37: This standard introduces a multi-token standard for the Polkadot ecosystem. It allows for the creation of multiple tokens with a single contract. This is particularly useful for platforms that require the issuance of multiple tokens with varying functionalities.

· 3 min read
Luca Auet
Gabriel Gonzalez
info

To open the app follow this link

The Journey of the Polkadot Contract Wizard Tool

The story of the Polkadot Contract Wizard Tool exemplifies how innovation and collaboration can result in the development of user-friendly tools that empower the next generation of web3 enthusiasts, enabling newcomers and enthusiasts to start building without requiring any prior coding knowledge.

The Spark at Polkadot Decoded

It all began in Buenos Aires, Argentina, during the "Polkadot Decoded" event in June 2022. A group of passionate individuals working in Protofire came together with a shared vision: to build something on the Polkadot platform. However, they faced a challenge - they didn't know where to start.

The Hackathon Triumph

Fast forward to November 2022, the team participated in the Polkadot Hackathon LATAM. Their goal was clear: to create a tool that would onboard the next generation into the world of web3. The result was a project that not only achieved this goal but also stood out among the rest. Their presentation, as showcased in the video, highlighted their commitment to making the Polkadot ecosystem more accessible to all. Their hard work paid off when they clinched the 1st prize with their project, as detailed on the Polkadot Hackathon LATAM website.

The Web3 Foundation Grant and the Birth of the Tool

With the momentum from their hackathon victory, the team applied for a Web3 Foundation Grant. Their proposal was to create the Polkadot Contract Wizard, a tool designed to simplify the process of creating and deploying standard smart contracts on the Polkadot ecosystem.

The initial phase of the Polkadot Contract Wizard was a success. It made it significantly easier for users to engage with the Polkadot ecosystem. It only worked in Rococo testnet, but the team didn't stop there. They envisioned a tool that was not only functional but also versatile. They aimed to expand its capabilities by adding features like:

  • Interaction with deployed contracts through the wizard's UI.
  • Custom smart contract interactions.
  • Shareable contract interaction links.
  • Support for multiple chains, including different parachains.

These enhancements were designed to cater to both developers and non-developers, making the Contract Wizard an essential tool for the Polkadot and Kusama community.

The Second Phase and Realizing the Vision

With the success of the initial phase, the team applied for a second phase of the Web3 Foundation Grant. Their goal was to continue refining the user experience and expand the tool's capabilities.

Today, a year after their journey began, the team at Protofire has successfully realized their vision. The Polkadot Contract Wizard Tool is now deployed and operational, thanks to the unwavering support of the Web3 Foundation Grants Program.

Polkadot Contract Wizard: A Journey 'To Be Continued

The story of the Polkadot Contract Wizard Tool is one of passion, perseverance, and the desire to make a difference. From its inception at a local event in Buenos Aires to its triumphant success at the Polkadot Hackathon LATAM and its eventual realization with the support of the Web3 Foundation, the tool stands as a beacon for all those who aspire to innovate and contribute to the world of web3.

Start using the wizard here