2 Commits
Author SHA1 Message Date
Johann Barbie 408cd44650 testing the test page 2023-07-25 14:23:03 +02:00
Johann Barbie ca36dec0f6 fix versions 2023-07-25 14:21:22 +02:00
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