Skip to content
Verified contractPartialMIT

GoalBonding

Address0xbf003a3e43b8502ba84885036cdb8ebfee4d0efc
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.0

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.0+commit.c7dfd78e
Language
solidity
Optimization
No
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
22,184,108
Creation transaction
0xbb4ac50e6c…13471eac19

GoalBonding.sol

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

interface GoalGenerator {
    function deposit() external payable;
    function withdraw(uint256 amount) external;
    function getOneConnectToken() external view returns (uint256);
}

contract GoalBonding {
    address public owner;
    GoalGenerator public Manage;
    
    constructor(address _Manage) {
        owner = msg.sender;
        Manage = GoalGenerator(_Manage);
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Not the contract owner");
        _;
    }

    function invest() external payable onlyOwner {
        require(msg.value > 0, "Investment must be greater than zero");
        Manage.deposit{ value: msg.value }();
    }

    function divest(uint256 amount) external onlyOwner {
        Manage.withdraw(amount);
    }

    function getManagedOneConnectToken() external view returns (uint256) {
        return Manage.getOneConnectToken();
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.