Alexander Codesalexandercodes.hashnode.dev·11 hours agoValidating Usernames in a Smart ContractIntroduction One of the first challenges in building an application is handling user registration. We often need to allow users to choose their own username, while ensuring that each one is unique. Usernames also usually require validation, with cons...Discuss·1 like·80 readsSmart Contracts
Alexander Codesalexandercodes.hashnode.dev·May 7, 2024Python & Smart ContractsIntroduction The inimitable Chris Kim recently tweeted about data types in smart contracts: https://twitter.com/chriskim_devrel/status/1787001209406251480?ref_src=twsrc%5Etfw And it got me thinking about friction points for onboarding new developer...Discuss·5 likes·152 readsPython
Alexander Codesalexandercodes.hashnode.dev·May 6, 2024Proof of Exclusion: A Smart Contract Bloom FilterIntroduction Smart contracts operate in highly constrained environments. We often need to use clever data structures to achieve particular goals within the confines of the virtual machine. A common requirement is to prove membership of something. For...Discuss·5 likes·164 readsbloom filter
Alexander Codesalexandercodes.hashnode.dev·May 2, 2024Dates, Times, and Property TestingIntroduction The Gregorian calendar is a royal pain in the arse. It was introduced in 1582, as a closer approximation of the solar year. The Gregorian leap year rule is: Every year that is exactly divisible by four is a leap year, except for years t...Eldar Ahmadov and 1 other are discussing this2 people are discussing thisDiscuss·2 likes·111 readsBlockchain
Alexander Codesalexandercodes.hashnode.dev·Apr 21, 2024Building a Personal NFT Marketplace on AlgorandIntroduction In this post, we're going to look at writing a simple smart contract in Algorand Python that allows a creator to list and sell their NFTs. The creator will be able to transfer assets to the application and set a sale price for each item ...Discuss·1 like·131 readsalgorand
Alexander Codesalexandercodes.hashnode.dev·Apr 20, 2024Simulating UTXOs on AlgorandIntroduction There are two main accounting models used in blockchains: the UTXO model and the account model. The former is used by Bitcoin and Cardano; the latter is used by Ethereum, Algorand, and most other blockchains. Let's see if we can use Pyth...Kardo Locksmith and 2 others are discussing this3 people are discussing thisDiscuss·10 likes·211 readsalgorand
Alexander Codesalexandercodes.hashnode.dev·Apr 18, 2024Tokenised Subscriptions on AlgorandIntroduction In this blog post, we'll explore a novel way to implement periodic payments on Algorand. The general idea is to write a smart contract that issues redeemable subscription tokens. Each subscription is represented by a unique asset, and ea...Eldar Ahmadov and 1 other are discussing this2 people are discussing thisDiscuss·13 likes·296 readsalgorand
Alexander Codesalexandercodes.hashnode.dev·Apr 14, 2024Proof of Chance: A Fair Launch Smart ContractIntroduction It's difficult to ensure that all users have equal access to purchase or claim assets at launch. The fundamental issue, as I see it, is that there's no way to link an account or a set of accounts to an individual, without destroying priv...Discuss·2 likes·112 readsalgorand
Alexander Codesalexandercodes.hashnode.dev·Apr 5, 2024FeaturedLinear Vesting in Algorand PythonIntroduction A vesting schedule is a mechanism that gradually releases tokens or assets over a specified period of time. In a linear vesting schedule, the release of tokens is linearly distributed over time, meaning that an equal amount of tokens is ...Discuss·17 likes·888 readsalgorand
Alexander Codesalexandercodes.hashnode.dev·Apr 2, 2024Inner Transactions in Algorand PythonLet's explore how we can use inner transactions in Algorand Python smart contracts. To follow along with the tutorial, start by importing the itxn submodule from algopy: from algopy import itxn You should then be able to see the different types of i...Discuss·2 likes·275 readsalgorand