Giter VIP home page Giter VIP logo

aleo-token-create's Introduction

🟢 Ön bilgi

Bu rehberde Aleo ile Token Oluşturmayı anlatacağım işlemleri ücretsiz Codespaces ile yapabilirsiniz.

Daha önce VPS üzerinde kurulum yaptıysanız aşağıdaki adımları tekrar yapmanıza gerek yoktur. Klasör oluşturalım bölümünden başlamanız yeterli.

Linkler

🟢 Sistem Kurulumu

cd
sudo su
#!/bin/bash
sudo apt update && sudo apt upgrade -y
sudo apt-get install git-all -y
sudo apt-get install curl -y
sudo su

Cargo kuralım :

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

🟢 Leo Dosyalarını çekelim

git clone https://github.com/AleoHQ/leo
cd leo
cargo install --path .
cd ..

🟢 üstteki güncellemeleri yaptıysanız buradan başlayalım

1- Klasör oluşturalım

mkdir aleo_token_herculesnode && cd aleo_token_herculesnode

image

2- Cüzdan adresi girelim

WALLETADDRESS=CÜZDANINIZIN-ADRESİ

image

3- Program ismi oluşturacağız burası önemli hercules yazan yeri kendi istediğiniz bir isimle değiştirin ! Burası değişecek = herculestoken , kendi isminizi yazın

*Not isminizi 8 karakterden fazla yapın yoksa fee yüksek çıkar. !!!

APPNAME=herculestoken

image

4- Leo test uygulaması oluşturalım Buradaki çıktıyı not alalım kendi program ismimizi oluşturduk aşağıda kullanacağız önemli

leo new ${APPNAME}

image

5- Leo uygulamasını başlatalım

cd ${APPNAME} && leo run && cd -

image

6- Yolu kaydedelim

PATHTOAPP=$(realpath -q $APPNAME)

image


🟢 Şimdi buraya kadar işlemleri bitirdik artık aleo SDK üzerinden devam edeceğiz.

1- Bu adrese Gidelim : https://aleo.tools/develop


Alt tarafta bulunan kodları Deploy Program bölümüne gelin ve oraya kopyalayın. ( program herculestoken.aleo; herculestoken yazan yeri değiştirmeyi unutmayın )


3. adımda yazdığınız isim ile değiştirmeyi unutmayın.

program herculestoken.aleo;

record Token:
    owner as address.private;
    amount as u64.private;


function mint:
    input r0 as address.private;
    input r1 as u64.private;
    cast r0 r1 into r2 as Token.record;
    output r2 as Token.record;


function transfer:
    input r0 as Token.record;
    input r1 as address.private;
    input r2 as u64.private;
    sub r0.amount r2 into r3;
    cast r0.owner r3 into r4 as Token.record;
    cast r1 r2 into r5 as Token.record;
    output r4 as Token.record;
    output r5 as Token.record;

image

2- Deploy doğrulamaya bakalım.

Deploy yaptıktan sonra altında size bir tx verecek bunu explorer üzerinden kontrol edelim.

Bu adresin sonuna verdiği tx numarasını yazın işlemler doğruysa resimdeki gibi görünecek : https://explorer.aleo.org/transaction/TX-ADRESİNİ-YAZ

image

3- Token oluşturma adımını yapalım

Bu adrese girelim yine bu sefer en üstteki alanı kullanacağız Execute Program : https://aleo.tools/develop

1- Load Program : token isminiz ne ise onu yazıp aratın
2- Private Key : Cüzdan Private key yazın
3-Execute On-Chain : buton açık olacak
4-Fee : 3 yazın olmazsa arttırın

Mint bölümü
1-r0 : Cüzdan adresinizi yazın
2-r1 : 2000u64 yazın ne kadar istiyorsanız rakamı değiştirin

Run tuşuna basın

image

4- İşlem tamamlanırsa aşağıdaki gibi onay gelecek

Explorer üzerinden kontrol edin verdiği tx çıktısını aşağıdaki adreslerin sonuna ekleyerek kontrol edebilirsiniz.

https://explorer.hamp.app/transaction?id=
https://explorer.aleo.org/transaction/

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.