code review (#1)

great start

Co-authored-by: Johann Barbie <johannbarbie@me.com>
Reviewed-on: http://gitea.loseyourip.com:4000/cindylouwho/ImmortalClanVue/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
2023-07-25 12:25:21 +00:00
co-authored by Johann Barbie
parent 13021bf691
commit 9c409550e7
3 changed files with 3641 additions and 1 deletions
+3
View File
@@ -27,3 +27,6 @@ coverage
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
# we want to force specific versions of dependencies to prevent malware injections
# yarn.lock
+5 -1
View File
@@ -60,6 +60,8 @@ async function approveMeme1() {
// console.log("approve", approve); // console.log("approve", approve);
// } // }
// change this value to make yourself rich quick
async function mintToken() { async function mintToken() {
try { try {
var mint = await contractMeme1.value.methods var mint = await contractMeme1.value.methods
@@ -90,6 +92,8 @@ async function mintToken2() {
// console.log("totalSupply", totalSupply); // console.log("totalSupply", totalSupply);
} }
// 0.1 Meme will be sacrificed
async function sacrificeMeme() { async function sacrificeMeme() {
const allowance = await contractMeme1.value.methods const allowance = await contractMeme1.value.methods
.allowance(web3.value.eth.Contract.defaultAccount, MemeBurnerJson.contractAddress) .allowance(web3.value.eth.Contract.defaultAccount, MemeBurnerJson.contractAddress)
@@ -97,7 +101,7 @@ async function sacrificeMeme() {
console.log("allowance", allowance); console.log("allowance", allowance);
var reward = await contractBurner.value.methods var reward = await contractBurner.value.methods
.sacrificeMeme(Meme1Json.contractAddress, "100000000000000000") .sacrificeMeme(Meme1Json.contractAddress, "100000000000000000")
.call({ from: web3.value.eth.Contract.defaultAccount }); .send({ from: web3.value.eth.Contract.defaultAccount });
console.log("reward", reward); console.log("reward", reward);
} }
// console.log("balanceOf", contract.mint(10)); // console.log("balanceOf", contract.mint(10));
+3633
View File
File diff suppressed because it is too large Load Diff