Found 21 repositories(showing 21)
theahaco
The Stellar app lifecycle streamlined. `stellar scaffold` CLI: init, learn, & build ambitious apps. `stellar registry` CLI: author, publish, deploy & upgrade Wasm binaries + smart contracts (or use someone else's)
arda-org
🛠️ Init, Build, Test, Deploy MultiversX smart contracts in seconds. The full suite for efficiently developing high-quality contracts.
NourelhoudaAbdellaoui
Secure Donation Project based on truffle /metamask/ganache Your guide to build a project donation based on blockchain in order to ensure the traceability and the security of your money donation. Steps : Step 1:Setup your IDE coding in my case i choose VS code 1-I install the extension of truffle on VS Code .and I learn the basics of truffle thanks to the official site : https://trufflesuite.com/docs/truffle/ by the way truffle is just a development environment to code and compile your smart contract and is testing framework for blockchains using the ethereum virtual machine .So let’s take the first step : I created a folder named Nour project using this command : mkdir NourProject and also inside it i created 2 other folders :mkdir frontend and mkdir Blockchain Step2:Start with truffle so now let’s create our truffle project inside Nourproject/Blockchain thanks to the command truffle init Now let’s create our smart contract named Donation.sol in Nourproject/Blockchain/contracts and in direction Nourproject/Blockchain/migration/Donation.js fo deploying later your smart contract on ganache we will use this fil!e .js So our smart Contract looks like: //SPDX-License-Identifier:MIT pragma solidity ^0.8.0; //so contract Donation{ //struct :define your type Donor //inside struct you can grouping your different information that you wanna track it struct Donor{ //uint (only integer without minus) uint id ;//id of donor string name;// the name of donor uint256 amount;// the amount of donor address sender_address;//Donprs wallet address } uint256 id=0; //Mapping is Mapping is a reference type as arrays and structs as dictionnary in python is composed essentially by key =>value mapping(uint=>Donor)public sender; //function to add another donor to take a place //payble is function its role to recieve ETH from donors in oder to store //donors data and the amount paid function addDonor(string memory name)public payable { id+=1; sender[id]=Donor(id,name,msg.value,msg.sender); } So now let’s how to complelete the donation.js in migration so after coding our smart contract we have install ganache thanks to this link: https://trufflesuite.com/ganache/ so now let’s compile the smart contract thans to this command truffle compile before we deploy it into ganache we have to add the project into ganache now let’s relate ganache to truffle test so let’s deploy it into the ganache (local blockchain test ): truffle migrate Step3 :Frontend part this part based on html /css/js So in this part just we use the basic tools of html/css/js as u see here in the image bellow : so let’s understand some buttons function as the button connect this button it’s main function is to extract address account from metamask so the steps that you should follow it in this part just build a simple button thanks to bootstrap https://getbootstrap.com/docs/5.2/getting-started/introduction/ and create a simple squelette of form and add some animation thanks to css so let’s add the script of web3.js to let our website worked on blockchain browser thanks to this script <script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script> so enable it by writing this piece of code //Enable Web3 async function loadWeb3(){ if(window.ethereum) { window.web3 = new Web3(window.ethereum); } } and then load smart contract from truffle thanks to it’s ABI and it’s address : you can find the ABI in build file it will create automatic when you built your contract so in my case my ABI is located in the direction of build /Donation.json so My ABI : "abi": [ { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "sender", "outputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "sender_address", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "name", "type": "string" } ], "name": "addDonor", "outputs": [], "stateMutability": "payable", "type": "function" } ], So the address is the same of the contract address : so after loading the smart contract thanks to it’s ABI and address you can read data from and load all of it’s function by some code in js and then connect to the metamask wallet and get the address of the account after just donate by the button donate all of :this detail is written in code js you can say it in code js in the code file wish that document is helpful So as you see after donate to ether thanks for some fake ethers in the metamask wallet which is take it fro the ganache balances with simple steps just open metmask extension>settings >add network>then add the url rpc of your ganache and in the id chain write 1337 after passing the transaction another block added in the ganache so that’s all wish this documentation was helpful to you to understand the code how it running
streamr-dev
Init scripts for contracts on the private chain in streamr-docker-dev environment
steffanomcrey
Proof of Loyalty smart contract built on Ethereum (Note this Contract should be considered an example of a basic framework for token loyalty based on block.timestamp or block.number) Development environment: Truffle Testing Framework: Truffle (recommended) Remix (optional) Ethereum MainNet Contract: Currently not for production Ethereum MaiNet Contract Link: Current not for production Ropsten TestNet Contract: TestNet Link Ropsten TestNet Contract Address: 0xb954c94Ed1E96Be6cc55d0b62A4089f610d8aFEA information_source Contributors: Please see the Development section of this README. Quick Usage External script runner that executes scripts within a Truffle environment. Developers who want to set up there own project directory: $ truffle init Solc Compiler Make sure Docker is installed on your machine so truffle can obtain the proper solc compiler version: $ truffle compile Verify contract was compiled successful using: - solc: 0.4.25+commit.59dbf8f1.Linux.g++ From there, you can run truffle compile, truffle migrate and truffle test to compile your contracts, deploy those contracts to the network, and run their associated unit tests. Development We welcome pull requests. To get started, just fork this repo and clone it locally $ git clone https://github.com/YOURFORKEDPROJECT To get started please see the Quick Usage section of this README. Proof Of Loyalty Pros Lightweight contract resulting in low gas execution calls User friendly for large communities No randomized reward process, everyone will be rewarded based on token loyalty Day Multiplier is executed with limited gas cost (no forloops are used for this function) Compounding interest can be included or removed depending on reward amount calculations (only during contract development cannot be changed after the contract is deployed) Interest Multiplier allows for multi tier rewards based on the conditions set during development (ie bob hold 1000 tokens he gets 10% APR sara holds 2000 tokens and she gets 20% APR ) Loyalty tokens are stored at an external address to prevent such attacks Loyalty rewards are given at the end of the loyalty cycle when the user calls withdraw loyalty to prevent malicious spending during supposed token loyalty Proof of Loyalty Cons/Issues Unknown storage growth over long periods of time with extremely large communities. Even tho the msg.senders strut mapping is deleted upon withdrawal, if the mapping exceeds 10000 addresses its hard to say the rewards values wouldn't be eaten by the gas cost to map over the array and execute the transaction. (this is why we recommend setting a required loyalty amount. Keep in mind to make this amount fair) One could assume due to a community actively trading this issue may not occur for a long period of time which a new contract can be redeployed. Both the timestamp and the block hash can be influenced by miners to some degree. Bad actors in the mining community can for example run a casino payout function on a chosen hash and just retry a different hash if they did not receive any money. The current block timestamp must be strictly larger than the timestamp of the last block, but the only guarantee is that it will be somewhere between the timestamps of two consecutive blocks in the canonical chain. Known Issues Known issues can be viewed publicly using pre audit reports compiled by Chainsecurity Bug Bounty Bug bounties are subject to approved pull request or users bugs found by interactions with our TestNet contract. Both will result in a bounty reward Test File Please add all bugs found with the appropriate test.js file alongside your purposed contract solutions. Contributors If you wish to learn more about the project please join our telegram with your github username and ask our admins how to start earning rewards.
samdann
init course for smart contracts dev
aruntemme
No description available
aalali1307
Draft
initia-labs
Move smart contract for INIT token vesting
aalali1307
No description available
aalali1307
Draft
aalali1307
Draft
aalali1307
Draft
aalali1307
Draft
aalali1307
No description available
Deploys the core logic (ERC-20/NFT) using Hardhat/Foundry to Base.
mokdonjr
truffle init 해서 돌려보기 (smart contract devops 구축 테스트)
oluibk2020
init Solidity smart contract deployed to sepolia and Zksync networks
pwagner
Calculates the INIT_CODE_HASH of the smart contract bytecode (needed for CREATE2 address computation)
imduchuyyy
This repo is using for init new eosio smart contract project based on dgoods token standard
A journey from `truffle init`, a freshly generated Ethereum smart contract development project, to a successful compilation of the TypeScript smart contract wrappers generated by the abi-gen utility.
All 21 repositories loaded