Skip to content
Verified contractExactMIT

PrimusCreditRail

Address0xe183b3576e238545a327676e831cb262feaf3f77
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.34

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,501,409
Creation transaction
0xdfc48d0c8a…27911de262

PrimusCredit.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

contract PrimusCreditRail {
    struct CreditProfile {
        bool isVerified;
        uint256 verifiedIncome;
        string proofHash;
    }

    mapping(address => CreditProfile) public creditProfiles;

    // Event for the frontend terminal to catch
    event CreditVerified(address indexed user, uint256 income, string proof);

    // In a production environment, this function verifies a real ZK-SNARK.
    // For this architectural lab, we simulate the verification of the Primus payload.
    function submitIncomeProof(uint256 _income, string memory _proofHash) public {
        require(!creditProfiles[msg.sender].isVerified, "User already holds a ZK Credit Credential");

        creditProfiles[msg.sender] = CreditProfile({
            isVerified: true,
            verifiedIncome: _income,
            proofHash: _proofHash
        });

        emit CreditVerified(msg.sender, _income, _proofHash);
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.