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

View File

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

View File

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