LogoLogo
GithubAPIsJoin Research & DevelopmentWebsite
  • Openmesh
    • Openmesh Overview
    • Litepaper
      • Litepaper Link
      • Decentralisation Compromised
      • The Openmesh Solution
      • Principals & Governance
      • Openmesh's 10 Commandments
      • Core Innovation & Breakthroughs
      • Openmesh's Journey
      • Importance of Defining Web3
      • Investor Roadmap
      • Go To Market Milestones
      • OPEN Tokenomics
      • Governance & Transparency
      • Openmesh DAO
    • Openmesh Expansion Program
      • How to whitelist
      • How to perform asset transfer
      • Openmesh Expansion Program (OEP)
    • Project FAQs
    • Important Links
    • Getting Started Guides
    • App Templates
    • Use Cases
    • Advanced Templates
  • Products
    • Xnode
      • Xnode DVM
      • Xnode Studio
      • Link to Xnode Studio
      • XnodeOS
      • Basic Getting Started Guides
        • Buying your DVM from Opensea
        • Connecting your Web3 Wallet & Creating a Login Session
        • Redeeming Your DVM
        • Select Template via App Store
        • Deploy to DVM or Bare Metal
        • Monitoring Your Deployments
      • Template Deployment Guides
        • Deploy a Chainlink Data Dashboard
        • Deploying a Minecraft Server
      • Use-Case Deployment Guides
        • Deploying Ollama + Open WebUI App
      • Advanced Deployment Guides
        • Xnode NextJS Base Template
    • Xnode One
    • Openmesh Cloud
      • Openmesh Core
        • Openmesh Core - Github
      • Decentralized Service Mesh Protocol (DSMP)
      • Openmesh API
      • Pythia
    • Integrations
      • Chainlink CCIP
  • Open Source Initiatives
    • Contributions
    • OpenR&D
      • Open R&D Link
      • Vision
      • Problem Statement & Innovation
      • Task progression
      • Supported Chains
      • Glossary
      • Contact Us
      • Verified Contributors
        • OVC DAO
        • Departments
          • Dispute Department
          • Expert Department
      • Getting Started
        • Creating Tasks
          • Create a Task
            • Connect Wallet
          • Accept an application
          • Review a submission
          • Additional management
        • Perform Tasks
          • Apply to task
            • Edit Profile
          • Take a task
          • Create a submission
          • Dispute Resolution
      • FAQs
      • OpenR&D Smart Contracts
        • Tasks
        • Escrow
        • Task Drafts
Powered by GitBook
On this page
  • Create draft task
  • Update Addresses
  • Auto-generated documentation
  1. Open Source Initiatives
  2. OpenR&D
  3. OpenR&D Smart Contracts

Task Drafts

Create draft task

Inputs

Metadata: string; the uri for the metadata of the proposal.

StartDate: uint64; unix timestamp (seconds) when the proposal voting period starts.

EndDate: uint64; unix timestamp (seconds) when the proposal voting period ends.

TaskInfo: CreateTaskInfo (tuple(string, uint64, ERC20Transfer[] (tuple(address, uint96)), address, PreapprovedApplication[] (tuple(address, Reward[] (tuple(bool,address,uint88)))))); information about the task you want to propose to be created.

Code

```solidity
function createDraftTask(
    bytes calldata _metadata,
    uint64 _startDate,
    uint64 _endDate,
    CreateTaskInfo calldata _taskInfo
) external {
    // Could also add approve ERC20's of budget here
    // Currently the DAO should approve select ERC20's in advance (once) for unlimited spending

    IDAO.Action[] memory actions = new IDAO.Action[](1);
    {
        bytes memory callData = abi.encodeWithSelector(
            tasks.createTask.selector,
            _taskInfo.metadata,
            _taskInfo.deadline,
            _taskInfo.budget,
            _taskInfo.manager,
            _taskInfo.preapproved
        );
        actions[0] = IDAO.Action(address(tasks), 0, callData);
    }

    governancePlugin.createPluginProposal(
        _metadata,
        actions,
        0,
        _startDate,
        _endDate
    );
}
```

Update Addresses

Inputs

Tasks: ITasks (address); the new address of the tasks contract used to create the draft tasks.

GovernancePlugin: IPluginProposals (address); the new address of the governance plugin used to create proposals.

Code

```solidity
function updateAddresses(
    ITasks _tasks,
    IPluginProposals _governancePlugin
) external auth(UPDATE_ADDRESSES_PERMISSION_ID) {
    tasks = _tasks;
    governancePlugin = _governancePlugin;
}
```

Last updated 7 months ago

Auto-generated documentation