Skip to content

Commit

Permalink
batch-100 initial
Browse files Browse the repository at this point in the history
  • Loading branch information
temptemp3 committed Nov 5, 2024
1 parent 3ed1c7f commit 41d0420
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 88 deletions.
47 changes: 47 additions & 0 deletions src/VERSIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# VERSIONS.md

This file keeps track of all updates, changes, and improvements made to the smart contracts in this project. Each version entry includes a description of the updates and any important notes.

---

## Version 1.2

**Release Date:** 2024-11-04

### Updates

- Remove reduce_total override introduced in version 1.1.

### Notes

- Update applied to contracts upgraded in batch 003.

---

## Version 1.1

**Release Date:** 2024-10-31

### New Features

- Override reduce_total method to allow for the reduction of the total after funding.

### Notes

- Update applied to select contracts in batch 004 to fix overright in batch 003. To be reverted.

---

## Version 1.0

**Release Date:** 2024-09-30

### Features

- Smart contract staking for Voi Network.

### Notes

- Smart contract audited

---
24 changes: 12 additions & 12 deletions src/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ def abort_funding(self) -> None:
def update(self) -> None:
assert Txn.sender == self.upgrader, "must be upgrader"
assert self.updatable == UInt64(1), "not approved"
self.deployment_version = UInt64(1)
self.deployment_version = UInt64(2)

# kill method
# only callable by upgrader
Expand All @@ -1075,17 +1075,17 @@ def kill(self) -> None:
close_offline_on_delete(self.funder)

# override reduce_total method
@arc4.abimethod
def reduce_total(self, adjustment: arc4.UInt64) -> None:
#########################################
assert Txn.sender == self.funder, "must be funder"
#########################################
assert adjustment <= self.total, "adjustment accurate"
#########################################
total = self.total - adjustment.native
itxn.Payment(receiver=self.funder, amount=adjustment.native, fee=0).submit()
arc4.emit(TotalReduced(adjustment, arc4.UInt64(total)))
self.total = total
# @arc4.abimethod
# def reduce_total(self, adjustment: arc4.UInt64) -> None:
# #########################################
# assert Txn.sender == self.funder, "must be funder"
# #########################################
# assert adjustment <= self.total, "adjustment accurate"
# #########################################
# total = self.total - adjustment.native
# itxn.Payment(receiver=self.funder, amount=adjustment.native, fee=0).submit()
# arc4.emit(TotalReduced(adjustment, arc4.UInt64(total)))
# self.total = total


##################################################
Expand Down
130 changes: 65 additions & 65 deletions src/scripts/clients/AirdropClient.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/scripts/clients/AirdropFactoryClient.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/scripts/clients/CompensationFactoryClient.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/scripts/clients/StakingFactoryClient.ts

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/scripts/program/compensation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ program
program
.command("prepare-fill")
.description("Fill the contracts")
.option("-f, --file <path>", "Path to the JSON file", "tmp/fill-004.csv")
.option("-f, --file <path>", "Path to the JSON file", "tmp/fill-100.csv")
.option(
"-o, --file2 <path>",
"Path to the error log file",
"tmp/fill-004.csv.json"
"tmp/fill-100.csv.json"
)
.option("--apid <number>", "Application ID")
.option("--sender <address>", "Sender address")
Expand Down Expand Up @@ -322,7 +322,7 @@ program
program
.command("execute-fill")
.description("Execute the fill")
.option("-f, --file <path>", "Path to the JSON file", "tmp/fill-004.csv.json")
.option("-f, --file <path>", "Path to the JSON file", "tmp/fill-100.csv.json")
.option("--sender <address>", "Sender address")
.option("--nodryrun", "No dry run", false)
.option("--delay <number>", "Delay in seconds", "0")
Expand Down Expand Up @@ -369,12 +369,12 @@ program
.option(
"-f, --file <path>",
"Path to the JSON file",
"tmp/compensation-004.csv"
"tmp/compensation-100.csv"
)
.option(
"-o, --file2 <path>",
"Path to the error log file",
"tmp/compensation-004.csv.json"
"tmp/compensation-100.csv.json"
)
.option("--apid <number>", "Application ID")
.option("--sender <address>", "Sender address")
Expand Down

0 comments on commit 41d0420

Please sign in to comment.