Skip to content

Commit f1f7fa2

Browse files
committed
Add decrease allowance function to Allocator.sol
1 parent 9d33a70 commit f1f7fa2

13 files changed

+1019
-3
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ Function to add an allowance for the notary. Invoked only by the contract owner.
9393
- `allocatorAddress`: Address of the notary to add allowance for.
9494
- `amount`: The amount of allowance to add.
9595

96+
`decreaseAllowance(address allocatorAddress, uint256 amount) external onlyOwner`
97+
98+
Function to decrease an allowance for the notary. Invoked only by the contract owner.
99+
100+
- **Parameters:**
101+
- `allocatorAddress`: Address of the notary to add allowance for.
102+
- `amount`: The amount of allowance to decrease.
103+
96104
`setAllowance(address allocatorAddress, uint256 amount) external onlyOwner`
97105

98106
Function to set an allowance for the notary. Invoked only by the contract owner. Allowance can be set to 0. To set an allowance bigger than 0, allowance before must equal 0.

abis/Allocator.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@
7979
],
8080
"stateMutability": "view"
8181
},
82+
{
83+
"type": "function",
84+
"name": "decreaseAllowance",
85+
"inputs": [
86+
{
87+
"name": "allocator",
88+
"type": "address",
89+
"internalType": "address"
90+
},
91+
{
92+
"name": "amount",
93+
"type": "uint256",
94+
"internalType": "uint256"
95+
}
96+
],
97+
"outputs": [],
98+
"stateMutability": "nonpayable"
99+
},
82100
{
83101
"type": "function",
84102
"name": "getAllocators",

0 commit comments

Comments
 (0)