Skip to content

Instantly share code, notes, and snippets.

View AliArshadswl's full-sized avatar
🎯
Focusing

Muhammad Ali Arshad AliArshadswl

🎯
Focusing
View GitHub Profile
@AliArshadswl
AliArshadswl / WhiteMatrix.md
Last active January 13, 2021 06:28
WhiteMAtrix

ChainIDE Deploys Binance Smart Chain (BSC) Contract

Preface

Friends who have some knowledge of digital currency should know about Binance. Binance recently launched a blockchain that is compatible with Ethereum (EVM) and runs smart contracts, called Binance Smart Chain. This chain uses proof of stack alliance (POSA) to conduct node election and consistency verification. Participants use BNB mortgage to participate. If the verification transaction is successful, a valid block is proposed, and the transaction fee in the block will be charged.

What we, at WhiteMatrix Academy want to introduce today is how to deploy a smart contract on BSC using Binance IDE and Metamask.

@AliArshadswl
AliArshadswl / Decentralized finance.md
Last active January 8, 2021 04:55
This Gist is about Defi

Decentralized finance (Defi)

Hello everyone, this time we deploy a simple decentralized finance (Defi) smart contract project on the Binance Smart Chain (BSC) through ChainIDE. This project contains two ERC20-based tokens. We temporarily call these two tokens ChainToken and RevenueToken (hereinafter referred to as CT and RT). CT is used to simulate the digital currency held by users themselves and RT is the interest obtained after the user pledges CT. The workflow of the entire Defi project is executed by a Farm contract. The user pledges the digital currency, he/she holds into the Farm contract. The contract generates RT according to the amount of pledged by the user and returns it to the user as interest.

Tools used in the project

  1. Binance IDE
  2. Metamask (connected to BSC Binance Smart Chain)

Connection Method

Open the MetaMask Little Fox and select the c

@AliArshadswl
AliArshadswl / Cefi and Defi, What and why.md
Created January 8, 2021 08:51
Cefi and Defi, What and why

Cefi and Defi, What and Why?

Both Cefi and Defi provide a way for people to manage their money and each has its advantages and disadvantages.

Cefi

All over the world, people use traditional financial services every day. However, these services are provided by big banks and always have a single point of failure. CeFi is an extension of the existing financial model, but upgraded to the next level with crypto. "It alleviates one of the biggest pain points of the traditional financial system — accessibility but keeps the usability and simplicity as it's more familiar to most people." said Dashdorj.

@AliArshadswl
AliArshadswl / Cefi and Defi, What and why_1.md
Created January 8, 2021 09:01
Cefi and Defi, What and why

Cefi and Defi, What and Why?

Both Cefi and Defi provide a way for people to manage their money and each has its advantages and disadvantages.

Cefi

All over the world, people use traditional financial services every day. However, these services are provided by big banks and always have a single point of failure. CeFi is an extension of the existing financial model, but upgraded to the next level with crypto. "It alleviates one of the biggest pain points of the traditional financial system — accessibility but keeps the usability and simplicity as it's more familiar to most people." said Dashdorj. Centralization refers to a point of central control, which in the case of finance refers to banking institutions. Historically, centralization in finance was desirable as a measure and maintainer of stability in global financial processes, thought to be more secure and

Smart Contract for Voting with ChainIDE

In this smart contract, we will implement a voting process along with delegation. We'll use Solidity as a programming language, and Metamask for the deployment and testing. All this will be done using Binance IDE.

1. Preliminaries

In this section we will briefly explain the background knowledge to make you better understand the smart contract.
# Smart Contract for Voting with Binance Smart ChianIDE
<p align="center">
<img src="https://user-images.githubusercontent.com/16441258/104402961-70bdb880-5592-11eb-8338-4e95249f4a4c.png", align="center">
###### In this smart contract, we will implement a voting process along with delegation. We'll use Solidity as a programming language, and [Metamask](https://metamask.io/) for the deployment and testing. All this will be done using [Binance Smart ChainIDE](https://binanceide.com/project/welcome).
### 1. Preliminaries
###### In this section we will briefly explain the background knowledge to make you better understand the smart contract.

Smart Contract for Voting with Binance Smart ChianIDE

In this smart contract, we will implement a voting process along with delegation. We'll use Solidity as a programming language, and Metamask for the deployment and testing. All this will be done using Binance Smart ChainIDE.

1. Preliminaries

In this section we will briefly explain the background knowledge to make you better understand the smart contract.
pragma solidity >=0.6.2 <0.7.0;
contract store_load_name
{
string first_name;
function store(string memory _f_name)public {
first_name=_f_name;
}
function load() public view returns(string memory) {
return first_name;
pragma solidity =>0.4.1 <0.4.17;
contract employees_records
{
int id;
string f_name;
string last_name;
string address_;
string mob_no;
pragma solidity =>0.5.1 <0.7.0;
contract employees_records
{
int id;
string f_name;
string last_name;
string address_;
string mob_no;