Contract Address Details

0xE108c1F5Da817Bb2908a48BDE47B08B2f2731B29

Contract Name
DepTaskBridge
Creator
0x668e8a–9ef418 at 0x4d0063–4d548a
Balance
0 Ether
Tokens
Fetching tokens...
Transactions
98 Transactions
Transfers
98 Transfers
Gas Used
21,546,296
Last Balance Update
8056671
Contract name:
DepTaskBridge




Optimization enabled
true
Compiler version
v0.8.12+commit.f00d7308




Optimization runs
200
EVM Version
default




Verified at
2022-09-21T09:07:54.996684Z

Constructor Arguments

000000000000000000000000c39acc1b3fa595bbaf916a5d6ad222afc91eb079

Arg [0] (address) : 0xc39acc1b3fa595bbaf916a5d6ad222afc91eb079

              

Contract source code

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

interface IDEP{
	function nNodespecifiedAddressTask(
	        string calldata url, 
			string calldata options, 
			uint64 maxRunNum, 
			address[] memory receivers, 
			uint64 maintainBlocks
	    ) external;
    function blockUintPrice() external returns(uint64);
	function proofUnit() external returns(uint256);
}

contract DepTaskBridge {
	struct Task{
		string url;
		string options;
	}

	address public owner;
	IDEP public dep;
	Task public currentWork;


	event NewTaskChange(string url, uint256 time);

	modifier onlyOwner{
		require(msg.sender == owner);
        _;
	}	

	constructor(address _dep) {
		owner = msg.sender;
		dep = IDEP(_dep);
	}

	function setDEP(IDEP _dep) external onlyOwner {
		dep = _dep;
    }

	function setTask(string calldata workURL, string calldata options) external onlyOwner{
		currentWork.url = workURL;
		currentWork.options = options;
		emit NewTaskChange(workURL, block.timestamp);
	}

	function payForTask(address[] memory user_address, uint64 maintainBlocks) external{
		dep.nNodespecifiedAddressTask(currentWork.url, currentWork.options, 1, user_address, maintainBlocks);
	}
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_dep","internalType":"address"}]},{"type":"event","name":"NewTaskChange","inputs":[{"type":"string","name":"url","internalType":"string","indexed":false},{"type":"uint256","name":"time","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"url","internalType":"string"},{"type":"string","name":"options","internalType":"string"}],"name":"currentWork","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDEP"}],"name":"dep","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"payForTask","inputs":[{"type":"address[]","name":"user_address","internalType":"address[]"},{"type":"uint64","name":"maintainBlocks","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDEP","inputs":[{"type":"address","name":"_dep","internalType":"contract IDEP"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTask","inputs":[{"type":"string","name":"workURL","internalType":"string"},{"type":"string","name":"options","internalType":"string"}]}]
            

Contract Creation Code

0x608060405234801561001057600080fd5b506040516108cb3803806108cb83398101604081905261002f91610062565b60008054336001600160a01b031991821617909155600180549091166001600160a01b0392909216919091179055610092565b60006020828403121561007457600080fd5b81516001600160a01b038116811461008b57600080fd5b9392505050565b61082a806100a16000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806328ad5d1c146100675780634128c9281461007c578063855a0fe31461008f578063867bfa4b146100bf5780638da5cb5b146100d5578063933c6317146100e8575b600080fd5b61007a610075366004610418565b6100fb565b005b61007a61008a3660046104da565b61016d565b6001546100a2906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c76101dd565b6040516100b69291906105fe565b6000546100a2906001600160a01b031681565b61007a6100f636600461062c565b6102fd565b6000546001600160a01b0316331461011257600080fd5b61011e60028585610336565b5061012b60038383610336565b507f46f617ce398ebd0aa5f4e0addce08f464ae161ba527e36c6b386afdf3863367e84844260405161015f93929190610650565b60405180910390a150505050565b60018054604051636171a1e560e11b81526001600160a01b039091169163c2e343ca916101a7916002916003919088908890600401610764565b600060405180830381600087803b1580156101c157600080fd5b505af11580156101d5573d6000803e3d6000fd5b505050505050565b6002805481906101ec90610689565b80601f016020809104026020016040519081016040528092919081815260200182805461021890610689565b80156102655780601f1061023a57610100808354040283529160200191610265565b820191906000526020600020905b81548152906001019060200180831161024857829003601f168201915b50505050509080600101805461027a90610689565b80601f01602080910402602001604051908101604052809291908181526020018280546102a690610689565b80156102f35780601f106102c8576101008083540402835291602001916102f3565b820191906000526020600020905b8154815290600101906020018083116102d657829003601f168201915b5050505050905082565b6000546001600160a01b0316331461031457600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b82805461034290610689565b90600052602060002090601f01602090048101928261036457600085556103aa565b82601f1061037d5782800160ff198235161785556103aa565b828001600101855582156103aa579182015b828111156103aa57823582559160200191906001019061038f565b506103b69291506103ba565b5090565b5b808211156103b657600081556001016103bb565b60008083601f8401126103e157600080fd5b50813567ffffffffffffffff8111156103f957600080fd5b60208301915083602082850101111561041157600080fd5b9250929050565b6000806000806040858703121561042e57600080fd5b843567ffffffffffffffff8082111561044657600080fd5b610452888389016103cf565b9096509450602087013591508082111561046b57600080fd5b50610478878288016103cf565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104af57600080fd5b50565b80356104bd8161049a565b919050565b803567ffffffffffffffff811681146104bd57600080fd5b600080604083850312156104ed57600080fd5b823567ffffffffffffffff8082111561050557600080fd5b818501915085601f83011261051957600080fd5b813560208282111561052d5761052d610484565b8160051b604051601f19603f8301168101818110868211171561055257610552610484565b60405292835281830193508481018201928984111561057057600080fd5b948201945b8386101561059557610586866104b2565b85529482019493820193610575565b96506105a490508782016104c2565b9450505050509250929050565b6000815180845260005b818110156105d7576020818501810151868301820152016105bb565b818111156105e9576000602083870101525b50601f01601f19169290920160200192915050565b60408152600061061160408301856105b1565b828103602084015261062381856105b1565b95945050505050565b60006020828403121561063e57600080fd5b81356106498161049a565b9392505050565b604081528260408201528284606083013760006060848301015260006060601f19601f8601168301019050826020830152949350505050565b600181811c9082168061069d57607f821691505b602082108114156106be57634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c90808316806106de57607f831692505b602080841082141561070057634e487b7160e01b600052602260045260246000fd5b8388526020880182801561071b576001811461072c57610757565b60ff19871682528282019750610757565b60008981526020902060005b8781101561075157815484820152908601908401610738565b83019850505b5050505050505092915050565b60a08152600061077760a08301886106c4565b60208382038185015261078a82896106c4565b67ffffffffffffffff8881166040870152858203606087015287518083528389019450909183019060005b818110156107da5785516001600160a01b0316835294840194918401916001016107b5565b50509516608094909401939093525091969550505050505056fea2646970667358221220bb0016f65038a0274775434a2af5e292651930e31c14cf0ca5b805095ed85ae664736f6c634300080c0033000000000000000000000000c39acc1b3fa595bbaf916a5d6ad222afc91eb079

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c806328ad5d1c146100675780634128c9281461007c578063855a0fe31461008f578063867bfa4b146100bf5780638da5cb5b146100d5578063933c6317146100e8575b600080fd5b61007a610075366004610418565b6100fb565b005b61007a61008a3660046104da565b61016d565b6001546100a2906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c76101dd565b6040516100b69291906105fe565b6000546100a2906001600160a01b031681565b61007a6100f636600461062c565b6102fd565b6000546001600160a01b0316331461011257600080fd5b61011e60028585610336565b5061012b60038383610336565b507f46f617ce398ebd0aa5f4e0addce08f464ae161ba527e36c6b386afdf3863367e84844260405161015f93929190610650565b60405180910390a150505050565b60018054604051636171a1e560e11b81526001600160a01b039091169163c2e343ca916101a7916002916003919088908890600401610764565b600060405180830381600087803b1580156101c157600080fd5b505af11580156101d5573d6000803e3d6000fd5b505050505050565b6002805481906101ec90610689565b80601f016020809104026020016040519081016040528092919081815260200182805461021890610689565b80156102655780601f1061023a57610100808354040283529160200191610265565b820191906000526020600020905b81548152906001019060200180831161024857829003601f168201915b50505050509080600101805461027a90610689565b80601f01602080910402602001604051908101604052809291908181526020018280546102a690610689565b80156102f35780601f106102c8576101008083540402835291602001916102f3565b820191906000526020600020905b8154815290600101906020018083116102d657829003601f168201915b5050505050905082565b6000546001600160a01b0316331461031457600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b82805461034290610689565b90600052602060002090601f01602090048101928261036457600085556103aa565b82601f1061037d5782800160ff198235161785556103aa565b828001600101855582156103aa579182015b828111156103aa57823582559160200191906001019061038f565b506103b69291506103ba565b5090565b5b808211156103b657600081556001016103bb565b60008083601f8401126103e157600080fd5b50813567ffffffffffffffff8111156103f957600080fd5b60208301915083602082850101111561041157600080fd5b9250929050565b6000806000806040858703121561042e57600080fd5b843567ffffffffffffffff8082111561044657600080fd5b610452888389016103cf565b9096509450602087013591508082111561046b57600080fd5b50610478878288016103cf565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104af57600080fd5b50565b80356104bd8161049a565b919050565b803567ffffffffffffffff811681146104bd57600080fd5b600080604083850312156104ed57600080fd5b823567ffffffffffffffff8082111561050557600080fd5b818501915085601f83011261051957600080fd5b813560208282111561052d5761052d610484565b8160051b604051601f19603f8301168101818110868211171561055257610552610484565b60405292835281830193508481018201928984111561057057600080fd5b948201945b8386101561059557610586866104b2565b85529482019493820193610575565b96506105a490508782016104c2565b9450505050509250929050565b6000815180845260005b818110156105d7576020818501810151868301820152016105bb565b818111156105e9576000602083870101525b50601f01601f19169290920160200192915050565b60408152600061061160408301856105b1565b828103602084015261062381856105b1565b95945050505050565b60006020828403121561063e57600080fd5b81356106498161049a565b9392505050565b604081528260408201528284606083013760006060848301015260006060601f19601f8601168301019050826020830152949350505050565b600181811c9082168061069d57607f821691505b602082108114156106be57634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c90808316806106de57607f831692505b602080841082141561070057634e487b7160e01b600052602260045260246000fd5b8388526020880182801561071b576001811461072c57610757565b60ff19871682528282019750610757565b60008981526020902060005b8781101561075157815484820152908601908401610738565b83019850505b5050505050505092915050565b60a08152600061077760a08301886106c4565b60208382038185015261078a82896106c4565b67ffffffffffffffff8881166040870152858203606087015287518083528389019450909183019060005b818110156107da5785516001600160a01b0316835294840194918401916001016107b5565b50509516608094909401939093525091969550505050505056fea2646970667358221220bb0016f65038a0274775434a2af5e292651930e31c14cf0ca5b805095ed85ae664736f6c634300080c0033