Here's the visualization on wikipedia of a DOM tree.
#webdevelopment basics #DOM #100DaysOfCode
Your byte size news and commentary from Silicon Valley the land of startup vanities, coding, learn-to-code and unicorn billionaire stories.
It's very important to protect API keys, private keys in blockchain and API development. In general the best practice is: do not have API keys, or any secrets, sitting unprotected in code bases, even if it is in the server side logic. Front end code is definitely a big no no. We use environment variables to manage private keys and secrets. Some cloud platforms such as Google Cloud offers encrypted, cloud managed keys, with extra features such as key rotations, that's pretty cool. Here're are some tips from Chainlink smart contract hardhat starter kit.
There are two options of setting environment variables: store credentials in a .env file AND set it in command line. Remember to add any env file to .gitignore else you risk losing your credentials and subject your app to attack and misuse. Bad parties can steal your API keys make unauthorized transactions /requests and incur cost / lost.
The bash one works directly in the command line. The .env one is to be used with the dotenv npm package.
dotenv (node, npm package, weekly download 15,514,927 as of Jan 2022). "Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env." https://www.npmjs.com/package/dotenv
# with npm
npm install dotenv
# or with Yarn
yarn add dotenv
To verify installation is successful, also check the package.json file.
require('dotenv').config()
Create a .env file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE. For example:
DB_HOST=localhost
DB_USER=root
DB_PASS=s1mpl3
process.env now has the keys and values you defined in your .env file.
const db = require('db')
db.connect({
host: process.env.DB_HOST,
username: process.env.DB_USER,
password: process.env.DB_PASS
})
Once we define environment variables in the .env file the values are available with the process.env. prefix. That's pretty cool. Definitely exclude the .env file form git history and git push.
The environment variables sit near the operating system, or the virtual environment the code is running on. The code only pulls the value of the secrets. "Platforms can have its own unique mechanism for storing and retrieving environment variables. " https://youtu.be/17UVejOw3zA
Chainlink warns the data quality is important. Always check if you are using the best quality data feed. https://docs.chain.link/docs/reference-contracts/
https://docs.chain.link/docs/tutorials/
In this article we will discuss the Play-to-Earn Economy, aka P2E. Perhaps the most famous play to earn game is Axie Infinity, which amassed 1 million Daily Active Users (DAU). Its protocol revenue is only second to Ethereum, wow.
Too busy to read? Watch this youtube documentary about Axie Infinity: https://youtu.be/Yo-BrASMHU4
The video explaining play to earn went somewhat viral. People in struggling communities are playing Axie Infinity to change their life.
The concept play-2-earn is also connected with the idea of Metaverse, real estate NFT, in-game purchase, in-game economy etc.
"The Axie Infinity economy consists of a governance token (AXS) and a second token called Smooth Love Potion (SLP) that serves as an in-game currency, along with NFTs that represent both game characters and virtual real estate." - coinbase
"Every time an Axie is traded, a plot of real estate is sold, or two Axies are bred, the protocol takes a fee priced in a combination of AXS and SLP. Rather than go to the developers, this revenue is placed in the Axie treasury, which has ballooned to nearly $600 million."
Axie Infinity is not actually available in the United States. Its enormous success was based on emerging markets alone: Vietnam, Philippines, Brazil, India, Indonesia, Venezuela etc.
Games of web2, pre blockchain games, employs the free-to-play, or freemium model. It's to get started. Axie Infinity requires 3 to get started. You will have to do buy, rent, or obtain an AxieInfinityScholarship in order to get started. When the game first started, Axies average $10 per creature, now it is estimated to be north of $500 per creature.
Of course $1500 is not affordable at all for people in the Philippines. There are now systems of lending: when lending axies to others, the loan originator also gets a cut of the winning. You can think of this as a credit, borrowing / banking system build on top of the game. However, it is also smelling of pyramid when gamers have to pay to join and thus by recruiting new members, the game becomes more profitable for those at the top of the pyramid.
Yield Guild Games (YGG) "YGG is essentially a holding company for play-to-earn gaming assets. Starting in 2020, they’ve been buying up yield producing NFTs, governance tokens, and ownership stakes in promising gaming projects and protocols." - coinbase "Similar to how Uber pairs people who want to earn money driving with people who need rides, YGG pairs people who want to make money gaming with the NFTs they need to earn in play-to-earn games." YGG even has its own asset report https://medium.com/yield-guild-games/yield-guild-games-asset-treasury-report-july-2021-62f3a969d223 (July) " By the end of July, the YGG treasury had amassed 19,460 NFTs valued at over $10M across 12 play-to-earn games. Axie Infinity NFTs comprised close to 90% of that value."
With Sandbox's huge raise recently, we wonder if YGG has increased again, significantly in value. YGG also has a token. If you are interested in NFTs and games, it might be good to look at YGG's portfolio for brainstorming ideas. "YGG has also made early stage investments across 8 play-to-earn games via SAFT (Simple Agreement for Future Tokens)". May be this name is inspired by YCombinator SAFE?
Seriously best article about GameFi by coinbase blog https://blog.coinbase.com/axie-infinity-yield-guild-games-the-play-to-earn-economy-e73ac6b39e6c
Federal regulator in the gaming world? Product managers of games long know that in-game economy can be regulated. Players can be incentivised or disincentivised to certain activities. In Axie Infinity, the Fed is called the Sky Mavis.
"If Axie Infinity is its own digital nation, game developer Sky Mavis serves as its Federal Reserve. Where the Fed has various tools it uses to influence the economy, Sky Mavis can adjust the SLP issuance rate and breeding fees with the aim of keeping the Axie economy healthy. Just like a real economy, digital economies have to consider the effects of inflation."
For those already overwhelmed by the amount of information out there, a simple rule to keep in mind is axies are bought using Ethereum. If you want a part of the Axie Infinity earn but don't have time to learn one more thing. Consider Ethereum as your asset. Not financial advice, not qualified to give financial advice. WARNING Read our full disclaimer. WARNING
People have been using the analogy Ready Player One over and over again: where people living in dystopia can have their lives changed by their in-game performance in the metaverse where they play to earn. It's an exciting time and it is a sad time. Fortune rarely honors those who gamble or try to make-rich-quick-scheme. But for now, it's an exciting time to be a gamer.
Read more about Axie Infinity on coinbase, source 2 below
Source:
https://blog.coinbase.com/axie-infinity-yield-guild-games-the-play-to-earn-economy-e73ac6b39e6c
https://www.coinbase.com/learn/crypto-basics/what-is-axie-infinity
Blockchain, cryptocurrency, NFT concepts explained to developers. Understand the technical side of blockchain technology. Learn more about Web3 economy including Dapps, DeFi, DAOs, DEXs, GameFi, smart contracts. Decentralized tech with crypto and smart contracts can potentially provide transparency, trust, consensus, guaranteed execution. The crypto part makes the system potentially difficult if not impossible to manipulate / influence.
What is Blockchain? "Blockchain is the innovative database technology that's at the heart of nearly all cryptocurrencies" - David Rodeck, John Schmidt. "By distributing identical copies of a database across an entire network, blockchain makes it very difficult to hack or cheat the system."
Blockchain technology is useful not just for cryptocurrency. There are many new innovative application, usage of blockchain tech.
Blockchain: ideally blockchain technology is decentralized into a large network of nodes, where it'd be hard for a single party to take over a large number of nodes /computers. There's trust in the tech, security, and ability to execute the exact contract. "Decentralization solves the trust problem through redundant data validation." - From Technology to Society: An Overview of Blockchain-Based DAO. A public ledger. Sometimes double entry ledger. 区块链 - blockchain
Crypto: scarcity - can have limited supplies like Bitcoin. Divisibility of money can generate smaller denominations.
Crypto Kitty: one of the early successful, massive NFT games.
Consensus: consensus model. money is a consensus mechanism - MIT.
Crypto Cities: ethereum creator Vitalik Buterin discusses crypto cities and political DAOs on his personal blog. Vitalik Buterin on Crypto Cities
DAO : Decentralized Autonomous Organization (DAO). in a typical DAO, each token carries some form of voting rights. Every token is like a vote. Gives rise to e-governance and the concept of governance coins.
Dapps: decentralized apps
DeFi: decentralized finance. An example is stablecoins, lending and borrowing, trading on dencentralized exchanges. Without the middleman, such as a bank..
DEX: decentralized exchange.
Dogecoin nodes recently upgraded to version
Ethereum: the famous cryptocurrency that powers many top NFTs and DeFi apps. Year 2015
Gas fee:
Ledger: transaction ledger, balance ledger
Mainnet vs Testnet: Mainnet is the live, production environment with the actual ledger. Testnet uses testnet tokens, for development experimental work. will be recorded but is for testing. A example testnet for ethereum Ropsten test network.
Mining
NFT: 不可替代令牌, 中文名叫非同质化通证 数字艺术品 - digital art
OpenSea: is perhaps the largest NFT art platform and e-commerce site.
Oracle : one use case for oracle is for checking crypto conversion price before completing a payment.
Proof of work
Proof of stake
Smart contract: a piece of code that executes to ensure the rules and exact actions are taken during a transaction. Can be used to guarantee execution.
Solidity is the code for smart contracts. It has java like syntax.
Statistics: useful statistics how many blocks in the blockchain. how many blocks are added per minute / interval / duration.
Tokens and blockchains you may encounter at hackathons:
Metis Layer 2, Solana, ICON,
Tokens that are useful :
Metis can support DAO. Mobile first tokens/blockchains include : Celo, PiCoin
Transaction speed:
Projects:
Neighborhood hacks : build a blockchain tacoshop with Ark.io
Read the full disclaimer. Not financial advice. Not for trading use. Hypothetical discussions only. Informational only.
https://www.siliconvanity.com/2021/11/blockchain-crypto-stock-personal.html
Disclaimer: My company and I may both own crypto currency. All discussed is for informational purpose only. Crypto and blockchain, NFT, gaming are highly risky spaces. These are not financial advice. Risky investment may incur lost of investment and the entire principal. All discussion of technology is for informational purpose only. Mentioning a tech does not mean endorsement. All tutorials are for informational purpose only, cannot be used for commercial nor production use. Have not been tested for security. Using blockchain, cloud or machine learning technology may incur high costs. We are not responsive for costs, damage associated with any of these technology. You may want to monitor the cost, and set budget alarms and quotas whenever possible.
How are NFT used to provide owners desirable social and wealth status?
For all our crypto articles please read our disclaimer first
https://www.siliconvanity.com/2021/11/blockchain-crypto-stock-personal.html?m=1
WARNING, Disclaimer IMPORTANT: My company and I may both own crypto currency, NFT and other blockchain related products. We may currently or in the future invest in crypto, blockchain, NFT, token related companies. All discussed is for informational purpose only. Crypto and blockchain, NFT, gaming are highly risky spaces. These are not financial advice. Risky investment may incur lost of investment and the entire principal. All discussion of technology is for informational purpose only. Mentioning a tech does not mean endorsement. All tutorials are for informational purpose only, cannot be used for commercial nor production use. Have not been tested for security. Using blockchain, cloud or machine learning technology may incur high costs. We are not responsive for costs, damage associated with any of these technology. You may want to monitor the cost, and set budget alarms and quotas whenever possible. Not financial advice. Always do your own thorough research before investing. I am not a professional. Blockchain technology changes all the time, our post may be out of date, inaccurte, unusable, or not secure. Please always check with the underlining technology documentation for the latest, greatest, official guidance. Our posts are for informational purpose only. We will NOT be responsible for any issues, nor damages, nor losses.
React UI MATERIAL Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms. Columns, grid