feat (breaking): remove giftable voucher mint

This commit is contained in:
Mohamed Sohail 2023-05-29 22:47:52 +08:00
parent c030094897
commit fa9df4ed3e
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
4 changed files with 9 additions and 79 deletions

File diff suppressed because one or more lines are too long

View File

@ -11,11 +11,6 @@
"name": "_custodialAccountIndexAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_trainingVoucherAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_systemAccount",
@ -64,19 +59,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TrainingVoucher",
"outputs": [
{
"internalType": "contract IDemurrageTokenSingleNocap",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
@ -141,18 +123,5 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "trainingVoucerGiftAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]

View File

@ -1,6 +1,6 @@
{
"compiler": {
"version": "0.8.19+commit.7dd6d404"
"version": "0.8.20+commit.a1b79de6"
},
"language": "Solidity",
"output": {
@ -17,11 +17,6 @@
"name": "_custodialAccountIndexAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_trainingVoucherAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_systemAccount",
@ -70,19 +65,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TrainingVoucher",
"outputs": [
{
"internalType": "contract IDemurrageTokenSingleNocap",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
@ -147,19 +129,6 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "trainingVoucerGiftAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
@ -175,9 +144,9 @@
},
"settings": {
"compilationTarget": {
"CustodialRegistration.sol": "CustodialRegistrationProxy"
"CustodialRegistrationProxy.sol": "CustodialRegistrationProxy"
},
"evmVersion": "paris",
"evmVersion": "byzantium",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
@ -189,12 +158,12 @@
"remappings": []
},
"sources": {
"CustodialRegistration.sol": {
"keccak256": "0x0a90873cea012091ec3a74ee55767a4fc430cf96e4d2a4a7a7b0b7712c255939",
"CustodialRegistrationProxy.sol": {
"keccak256": "0x727a76b1d6397ab0a2a0d3462b72895f7b150c299f67a354b3bf10a19278c741",
"license": "AGPL-3.0-or-later",
"urls": [
"bzz-raw://8dcac825118e12374e22c3515536292cf3c84860bc3918de80fb8a653b4fb0b9",
"dweb:/ipfs/QmYJeJW7hL5RTbuPVpMfVtC4vDYZDCwA5mf1qriwWBXKNd"
"bzz-raw://5695aaf0b70ee20eb358909ca4dd7da25044927b72e7e7e3709464abb9f081df",
"dweb:/ipfs/QmWwdBur7GUejKUU13DxwtuqpUR5KX7RYWtNtSew2VdqnE"
]
}
},

View File

@ -9,18 +9,12 @@ interface ICustodialAccountIndex {
function add(address _account) external returns (bool);
}
interface IDemurrageTokenSingleNocap {
function mintTo(address _beneficiary, uint256 _amount) external returns (bool);
}
contract CustodialRegistrationProxy {
address public owner;
address public systemAccount;
uint256 public constant trainingVoucerGiftAmount = 5000000;
IEthFaucet public EthFaucet;
ICustodialAccountIndex public CustodialAccountIndex;
IDemurrageTokenSingleNocap public TrainingVoucher;
event NewRegistration(address indexed subject);
@ -34,13 +28,12 @@ contract CustodialRegistrationProxy {
_;
}
constructor(address _ethFaucetAddress, address _custodialAccountIndexAddress, address _trainingVoucherAddress, address _systemAccount) {
constructor(address _ethFaucetAddress, address _custodialAccountIndexAddress, address _systemAccount) {
owner = msg.sender;
systemAccount = _systemAccount;
EthFaucet = IEthFaucet(_ethFaucetAddress);
CustodialAccountIndex = ICustodialAccountIndex(_custodialAccountIndexAddress);
TrainingVoucher = IDemurrageTokenSingleNocap(_trainingVoucherAddress);
}
function setNewOwner(address _newOwner)
@ -63,7 +56,6 @@ contract CustodialRegistrationProxy {
{
CustodialAccountIndex.add(_subject);
EthFaucet.giveTo(_subject);
TrainingVoucher.mintTo(_subject, trainingVoucerGiftAmount);
emit NewRegistration(_subject);
}
}