Closed matt-quinn closed 1 year ago
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 2 weeks, 4 days from now. Please review their action plans below:
1) timfaner has started work.
Task5 submission 2) sidduhere has started work.
SUDT token ERC20 Compatible 3) antonyip has started work.
https://github.com/antonyip/nervos-gitcoin/tree/main/task-5 4) rickmort has started work.
I'll deploy the ERC20 proxy contract for the deposited SUDT. 5) soptq has started work.
I Will Deploy The ERC20 Proxy Contract For The Deposited SUDT 6) sisco0 has started work.
This project would transfer and get the sudt balance 7) vinhbhn has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 8) x777 has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 9) venoox has started work.
deploy erc20 proxy contract and read how many coins I have 10) l-kh has started work.
This is my submission for Gitcoin5 Nervos Hackathon 11) jinusean has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 12) rezahsnz has started work.
t5 nervos 13) toorusl has started work.
deploy contract for depoist 14) jpeterd has started work.
Deploying ERC20 proxy smart contract. 15) assafom has started work.
Step 5. 16) orangemio has started work.
https://github.com/orangemio/nervos-grants/tree/main/task5 17) epsilon-638 has started work.
Deploy ERC-20 proxy contract for deposited SUDT 18) missgeds has started work.
Task 5 submission 19) nicky-ru has started work.
In this project I will deploy The ERC20 proxy contract for the deposited SUDT 20) hsamndo has started work.
I will learn ho to deploy a ERC20 Proxy Contract 21) phungnm has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 22) ubinix-warun has started work.
nervos task 5 24) 7h2x5e has started work.
As project name! 25) mindolam has started work.
Deploying erc20 proxy contract for sudt. 26) happylolonly has started work.
https://github.com/happylolonly/nervos-hackathon/tree/main/task-5 27) rafat has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 28) sunguru98 has started work.
Will complete as per suggested :) 29) ben-razor has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 30) xinbadev has started work.
https://github.com/xinbaDev/nervos-gitcoin#gitcoin-5-deploy-the-erc20-proxy-contract-for-the-deposited-sudt 31) ayush20 has started work.
deploy erc20 proxy contract for deposited SUDT 32) johnalgo has started work.
Nervos 33) pgonday has started work.
Gitcoin hackaton 34) gabrycina has started work.
Nervos Hackaton Task 5 35) thanphl has started work.
Work for Gitcoin 36) andithemudkip has started work.
Task 5 37) guidieudo has started work.
Nervos Gitcoin Hackathon tasks.
Project : https://github.com/GuiDieudo/Nervos-Gitcoin-Hackathon 38) immodestextant has started work.
Nervos Hackathon task 5 39) ircrp has started work.
Deploy SUDT-ERC20 Proxy and check balance of SUDT on layer 2 40) maxx6262 has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 41) el-tumero has started work.
Sixth encounter with Nervos. 42) alizain5693 has started work.
task 5 done 43) galileocap has started work.
Deploy the ERC20 Proxy Contract for the Deposited SUDT 44) dragondev1906 has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 45) raiden1411 has started work.
Nervos 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 46) hodlrtodlrfarmr has started work.
Gitcoin: 5 Submission 47) scentlxss has started work.
nervos task5 48) luisantoniocrag has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 49) nomicid has started work.
Working on Task5! 50) francov99 has started work.
deploy the ERC20 Proxy Contract to interact 51) andermarce has started work.
Task5 52) juzkiddin has started work.
This is part five of Nervos Hackathon 53) huutrung has started work.
task5 54) ttnguyendev has started work.
A Project for Hackathon 55) lehoi2195 has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 56) ramshreyas has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 57) da3dalus88 has started work.
Nervos Network hackaton 58) bitcoineazy has started work.
$CKB Hackathon - Deployment of the ERC20 Proxy contract for the deposited SUDT 59) nishuzumi has started work.
nervos 60) lqne has started work.
Deploy ERC-20 proxy contract for the deposited SUDT / Check balance of the proxy contract 61) alexchun1011 has started work.
Task05 62) linhphamsg has started work.
In order to use SUDT tokens that have been moved between Layer 1 and Layer 2, you will need to deploy the ERC20 Proxy Contract to interact with them. This special Solidity smart contract has been prepared by the Nervos team to allow EVM to interact with SUDT tokens on Nervos.
The ERC20 Proxy Contract is a modified ERC20 Solidity contract where the token balance and transfer functions have been modified to interact directly with the Polyjuice EVM compatibility layer. This allows Ethereum smart contracts to use an ERC20 interface to work with SUDT tokens on Layer 2. 63) dex68 has started work.
ok 64) muhdmud has started work.
nervos network 65) fabioktldaf has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 66) mirrormirage0 has started work.
Deploy ERC20 Proxy contract for deposited SUDT 67) w5pand has started work.
NervosGitcoin 68) bayou020 has started work.
task 5 69) jackieyewang has started work.
https://github.com/Jackieyewang/Nervos-gitcoin/tree/main/task5 70) jefferson-pham has started work.
This project is a part of nervos hackathon for Task 5 71) carmen0208 has started work.
ERC20 smart contract 72) kevinchensr has started work.
Nervos-Broaden-The-Spectrum 73) bcvsv has started work.
Nervos(5) 74) sking789 has started work.
repo for ckb gitcoin hackathons 75) shinyhunters has started work.
Nervos task5 76) tn024687 has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 77) duylinh196tb has started work.
Nervos Gitcoin task 5 78) drugurares has started work.
Gitcoin Nervos Hackathon 79) ririen has started work.
This project involves creating a proxy contract for the previously created token and checking your account balance. 80) mrbearp has started work.
Nervos Gitcoin Hackathon Task 5 81) anhnt4288 has started work.
Nervous hackathon gitcoin 82) cito-lito has started work.
nervos 83) niedhui has started work.
Nervos Hackathon 06 84) tharunrai14 has started work.
Nervos hacakthon task 05 85) sabaiprimo has started work.
Project for Nervos Hackathon task 5 86) armujahid has started work.
Deploy the ERC20 Proxy Contract for the Deposited SUDT 87) theyashmhatre has started work.
Task 5 88) maxencealvarez has started work.
Task 5 89) stwith has started work.
nervos 90) wangjianyeart has started work.
I learnt a lot 91) mistakeone has started work.
task 5 92) waverune has started work.
Deploy contract Check sudt L2 balance 93) selimkafa has started work.
nervos5 94) wzor has started work.
Issue an SUDT Token on Layer 1 and Deposit it to Layer 2 95) kidneyweakx has started work.
Deploy the ERC20 Proxy Contract to interact with the SUDT tokens between Layer 1 and Layer 2. 96) mrjacobsullivan has started work.
Nervos - Broaden the Spectrum 97) rzbck has started work.
Gitcoin: 5- Deploy The ERC20 Proxy Contract For The Deposited SUDT 98) zzhengzhuo has started work.
Hackathon task 5 99) baoanh1310 has started work.
Deploy ERC20 token on Nervos testnet 100) stgllr has started work.
nervos-gitcoin 101) s1119858711 has started work.
finish task5 102) celoaken has started work.
Deploy ERC20 Proxy Contract 103) gapro8 has started work.
task 5 104) knnlrts has started work.
Nervos hackaton: task 5 105) carlososuna11 has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 106) jeasterman has started work.
Task 5 107) nhaga has started work.
Nervos 108) jcervante has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 109) cesheep has started work.
Nervo Step 5 110) pfed-prog has started work.
working on 5 project nervos 111) luiscrag has started work.
I'll learn how to deploy a ERC20 Proxy Contract. 112) miklosbarabas has started work.
I will deploy the ERC20 Proxy Contract for the deposited SUDT 114) lofravaz has started work.
Deploy the ERC20 Proxy Contract for the Deposited SUDT 115) preet-aulokh has started work.
deploy erc20 proxy 116) dziobakwszafie has started work.
Nervos 117) mashmzc has started work.
Deploy the ERC20 Proxy Contract for the Deposited SUDT 118) awaissaeeed has started work.
Deploy the ERC20 Proxy Contract for the deposited SUDT 119) yiniandawn has started work.
Task5 120) nabilanam has started work.
Gitcoin: 5) Deploy the ERC20 Proxy Contract for the Deposited SUDT 121) zyra-zia has started work.
Task 5 122) walkertraylor has started work.
Nervos Hackathon Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 123) dorian333 has started work.
Nervos Task 5 124) azmora has started work.
Hackaton 125) sgnovo8 has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 126) philippeomalley has started work.
Nervos Hackathon training Task 5 127) feravasica has started work.
Hackaton Nervos task5 128) reiss2000 has started work.
task5 129) berkayermis has started work.
Submissions of Task 5 130) rncrypto06 has started work.
Nervos Blockchain Tasks: Task 05 131) quocson95 has started work.
nervos-task 5 132) pulth has started work.
NervosHackathon Task5 Submission 133) tanishqdsharma has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 134) hoangnd298 has started work.
Nervos 135) billkirschner has started work.
Gitcoin-5-Deploy-The-ERC20-Proxy-Contract-For-The-Deposited-SUDT 136) locvalucha has started work. 137) chaitanyasjoshi has started work.
Deployed The ERC20 Proxy Contract For The Deposited SUDT 138) u2rust has started work.
NervosGitcoin 139) ufrok1 has started work.
NervosGitCoin 140) caneryy has started work.
task05 141) elfelf2 has started work.
gitcoin nervos 5 142) superburst has started work.
t5 143) meathewww has started work.
task 5 144) howinoc has started work.
task 5 145) mmcel has started work.
task 5 146) amitesh03 has started work.
Deploy the ERC20 Proxy Contract for the Deposited SUDT 147) sondq has started work.
nervos 5 148) aliabdullah54 has started work.
task05 149) vivensy has started work.
task5 150) michsss has started work.
gitcoin 151) quocson100 has started work.
Task 5 152) cocdap has started work.
This is task 5 153) sunydev has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 154) dhruv035 has started work.
Learning 155) u1dxpool has started work.
nervos_gitcoin 156) deepansharya1111 has started work.
This is my submission for task "Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT" 157) thanhnhann has started work.
Done Nervos-task5 158) dikky88 has started work.
ckb dikky task5 159) gentlebutapril has started work.
task5 160) ody123 has started work.
task5 161) raghav1997 has started work.
task 5 162) gaspreth has started work.
task5 163) ajit766 has started work.
Trying out Nervos 164) hhuuaa has started work.
do 165) huazhouwang has started work.
d 166) fsy412 has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 167) gdawson771 has started work.
3rd Year CS&AI student at edinburgh uni excited to be working in the crypto space 168) techmeupnl has started work.
Hackathon 169) superheavytoken has started work.
Stage 6 Hackathon Nervos 170) ysongh has started work.
I will deploy the ERC20 Proxy Contract for the Deposited SUDT 171) mxdui has started work.
Task 5 completed 172) terryboy has started work.
task5 173) arnaudatcomet has started work.
HKT Nervos #5 174) liushooter has started work.
task06 175) hdbhandari has started work.
Nervos - Broaden The Spectrum 176) kizna1ver has started work.
Task5 177) stone-rocket has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 178) demoncash08 has started work.
Interacting on layer 2 179) voldown has started work.
task 5 submission. 180) andrewpsp has started work.
Welcome to the Yard 181) jnditifei has started work.
step5 182) chochinlu has started work.
task 5 183) puppetmaster66 has started work.
Task 5 184) ykoyote has started work.
Try it out a cross multichain interoperability 185) asfman has started work.
nervos hackathon task 5 186) cuongtuanvu has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 187) schrubitteflau has started work.
Gitcoin: 5) Deploy the ERC20 Proxy Contract for the Deposited SUDT 188) rynsm4rt has started work.
another done! 189) deryyy has started work.
tast 5 done 190) ppecotot has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 191) cultless has started work.
05_Nervos - Deploy the ERC20 Proxy Contract 192) erredll has started work.
5) Deploy The ERC20 Proxy Contract For The Deposited SUDT 193) helmihidzir has started work.
Deploy The ERC20 Proxy Contract For The Deposited SUDT 194) flippinroo2 has started work.
This repository is to house submissions for the Nervos hackathon on GitCoin. 195) topma has started work.
My task 5 196) larricane has started work.
Gitcoin: 5) 197) earthnook has started work.
Nervos CKB platform learning 198) 7kms has started work.
Deploy the ERC20 Proxy Contract for the Deposited SUDT 199) oceansxq has started work.
nervos-gitcoin-5 200) sharpcx has started work.
sharpcx is ckb 201) leomanza has started work.
Gitcoin: 5) Deploy The ERC20 Proxy Contract For The Deposited SUDT
Learn more on the Gitcoin Issue Details page.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 4000.0 CKB (40.40 USD @ $0.01/CKB) has been submitted by:
@mattquinn-nervos please take a look at the submitted work:
not paying
This task is capped at maximum 150 submissions; so be in the first 150 valid submissions to get your payout!
5. Deploy the ERC20 Proxy Contract for the Deposited SUDT
In order to use SUDT tokens that have been moved between Layer 1 and Layer 2, you will need to deploy the ERC20 Proxy Contract to interact with them. This special Solidity smart contract has been prepared by the Nervos team to allow EVM to interact with SUDT tokens on Nervos.
The ERC20 Proxy Contract is a modified ERC20 Solidity contract where the token balance and transfer functions have been modified to interact directly with the Polyjuice EVM compatibility layer. This allows Ethereum smart contracts to use an ERC20 interface to work with SUDT tokens on Layer 2.
Task Instructions
We will use some example code that you will need to populate with values such as your private key and Ethereum address. After updating the values, we will execute the script to deploy the ERC20 Proxy Contract, and we'll then use it to check your SUDT balance on Nervos' Layer 2!
Prerequisites
To deploy the ERC20 Proxy Contract, also known as the SUDT-ERC20 Proxy Contract, you need to first have a Layer 2 SUDT ID. This can be found by depositing an SUDT to Layer 2 using the account-cli tool, which was done in the previous task. If you have not completed this task, please do so before proceeding.
This task requires the Gitcoin Task Instruction Examples repo (gw-gitcoin-instruction) which was setup in task 2. If you do not have this repo available for any reason, please set it up now.
1. Compile the Smart Contract and Copy the Artifact
Before you deploy a smart contract you need to compile it. Our instructions will show you how to quickly compile a smart contract using the Truffle compiler.
The SUDT-ERC20 Proxy Solidity smart contract below is
SudtERC20Proxy.sol
, and it is located in the `gw-gitcoin-instruction/src/examples/5-erc20-proxy/contracts/SudtERC20Proxy.sol file.The command below can be used to compile the Solidity into EVM bytecode using the Truffle compiler. This process will use Docker. If you do not have Docker installed, please revisit the task setup and requirements page.
After the command is complete you will find the compiled file in the
build/contracts
directory. ie:src/examples/5-erc20-proxy/build/contracts/ERC20.json
2. Deploy the SUDT-ERC20 Proxy Contract Using Web3.js
Next we will use the example code to deploy the smart contract. Open the file
src/examples/5-erc20-proxy/index.js
in an editor of your choosing. You will need to update the values inindex.js
to match your Ethereum private key and SUDT ID.Ethereum Private Key
This private key will be used to deploy the smart contract, and it should be the same Ethereum private key that funds were added to in the previous tasks. Make sure you use your Ethereum private key for Layer 2, not your Nervos CKB Layer 1 private key. Replace
<YOUR_ETHEREUM_PRIVATE_KEY>
with this value. Always make sure your private key is prefixed with "0x".SUDT ID
The SUDT ID is needed by the deployed contract in order to associate it with a specific SUDT token. This creates a 1:1 binding between the Ethereum smart contract and the Layer 2 SUDT token that cannot be changed once deployed. Replace
<YOUR_SUDT_ID>
with the SUDT ID from the token you created earlier.SUDT_NAME, SUDT_SYMBOL, and SUDT_TOTAL_SUPPLY
The other constant values SUDT_NAME, SUDT_SYMBOL, and SUDT_TOTAL_SUPPLY can be left as is. They are provided for compatibility reasons with ERC20, but these values don't have any effect at this time.
Run the Script
After all values have been replaced, use the following commands in a console to execute the script.
After running the command, the contract should deploy without any errors. You will be presented with a transaction hash, and an Ethereum contract address. The transaction hash is provided by Godwoken, and Ethereum contract address is provided by Polyjuice. Keep track of these values as they will be needed in the future tasks and for task submission.
Example Output:
3. Check your Layer 2 SUDT balance
Once the SUDT-ERC20 proxy smart contract has been deployed for your SUDT, you can check the token balance for any account. This can be done by calling the
ERC20ProxyContract.balanceOf
method. It accepts the account or smart contract address as first and the only argument. One important thing to remember though is that this is a Polyjuice address, not your Ethereum address. When dealing with addresses on-chain in smart contract calls, you will almost always want to use Polyjuice address.What is a Polyjuice address, you ask? A Polyjuice address is the address that Nervos' Layer 2 uses internally to track the Ethereum address behind it. The concept of Polyjuice address exists because of the cross-chain Layer 2 architecture used by Nervos. It is not possible to use the Ethereum address on Nervos Layer 2 because Nervos Layer 2 is designed to also support many other type of blockchain accounts. The addresses from all these different blockchains must be standardized to a single format that Nervos can utilize internally.
Don't worry though, it's extremely easy to go from the Ethereum to Polyjuice address and vice-versa. The example code to demonstrate this is included in
examples/5-erc20-proxy/check-sudt-balance.js
. You can also useaccount-cli
tool to do a one time conversion using command-line. The instructions foraccount-cli
can be found here.Next we will check an SUDT balance using the provided example code. Open the file
src/examples/5-erc20-proxy/check-sudt-balance.js
in an editor of your choosing. You will need to update the values inindex.js
to match your Ethereum address and the ERC20 Proxy Contract address.Ethereum Address
The script will need to know which Ethereum address we will check the balance of. Replace
<YOUR_ETHEREUM_ADDRESS>
with the Ethereum address that you previously deposited your SUDT to.ERC20 Proxy Contract Address
You should have received SUDT-ERC20 proxy contract address as a result of previous step of this tutorial. Replace
<YOUR_SUDT_PROXY_CONTRACT_ADDRESS>
with the address of the deployed ERC20 Proxy Cntract.Run the Script
After all values have been replaced, use the following commands in a console to execute the script.
Example Output:
Congratulations, the number you see at the end of the console output is the balance of SUDT tokens on Layer 2 for your Ethereum account!
You should see a value that is greater than zero since the instructions indicated that you should use the Ethereum account which already had tokens. If you see
0
then recheck the steps above starting with the Ethereum address.Task Submission
To complete the tasks, add the following materials to a document on your Github and submit for review by the judges (include the link in your Gitcoin submission):
Bonus: Get Layer 2 SUDT ID from Layer 1 SUDT Issuer Lock Hash (AKA SUDT Type Args)
If you have already deposited a SUDT and you don't know its Layer 2 SUDT ID there is a JavaScript code that you can use to retrieve it.
You need to prepare Layer 1 SUDT Issuer Lock Hash (AKA SUDT Type Args) and use
src/examples/5-erc20-proxy/get-sudt-id.js
.Helpful Links