Contract IMVDProxy

  • Path: contracts/IMVDProxy.sol
  • Version: 1
  • Title: Proxy Interface

Methods

callFromManager(address,bytes)

callable by the MVDFunctionalitiesManager only. Calls a Microservice using the Proxy as msg.sender

disableProposal(address)

Can be used by external Proposal Managers to disable not-yet started Surveys

emitEvent(string,bytes,bytes,bytes)

callable by Microservices only. Emits the general purpose "Event" event by the Proxy

emitFromManager(string,address,string,address,uint256,address,bool,string,bool,bool,address)

callable by the MVDFunctionalitiesManager only. Emits the FunctionalitySet event by the Proxy

flushToWallet(address,bool,uint256)

Utility public method callable by everyone to send all ether/tokens/NFT accidentally sent to the Proxy. It flushes all in the DFO Wallet

Params

  • is721: tokenAddress is 721 or ERC20
  • tokenAddress: the ERC20/ERC721 token to transfer. address(0) means flush ether
  • tokenId: the id of the eventual ERC721 Token to transfer

getDoubleProxyAddress()

GET the Double Proxy contract address

getMVDFunctionalitiesManagerAddress()

GET the Functionalities Manager contract address

getMVDFunctionalityModelsManagerAddress()

GET the Functionality Models Manager contract address

getMVDFunctionalityProposalManagerAddress()

GET the Functionality Proposal Manager contract address

getMVDWalletAddress()

GET the Wallet contract address

getStateHolderAddress()

GET the State Holder contract address

getToken()

GET the voting token contract address

init(address,address,address,address,address,address,address)

Initialization logic used during the constructor call

Params

  • doubleProxyAddress: Address of the double proxy
  • functionalitiesManagerAddress: Address of the Functionalities Manager
  • functionalityModelsManagerAddress: Address of the Functionality Models Manager
  • functionalityProposalManagerAddress: Address of the Functionality Proposal Manager
  • stateHolderAddress: Address of the State Holder contract
  • votingTokenAddress: Address of the Voting Token
  • walletAddress: Address of the wallet

newProposal(string,bool,address,uint256,address,bool,string,string,bool,bool,string)

Add a new proposal

Params

  • codeName: ID of the microservice, to be called by the user through Proxy, can be blank.
  • emergency: Boolean, true -> Emergency Proposal, false -> Standard Proposal
  • isInternal: Boolean flag controlling wether the microservice can be called from anyone (false) or can be called only by other microservices (true)
  • location: Address of the functionality/microservice to call
  • methodSignature: Name of the method of the microservice you want to call
  • needsSender: All microservices calls are made py the Proxy, with this boolean flag you can
  • replaces: codeName of the microservice that will be replaced by this Proposal, can be blank.
  • returnParametersJSONArray: Array of json encoded return parameters of the proposal
  • sourceLocation: Location of the source code, saved in concatenated Base64 data chunks
  • sourceLocationId: Base64 data chunk id of the corresponding Microservice
  • submittable: Boolean flag controlling wether the microservice writes data to the chain

Returns

  • proposalAddress: Address of the newly created proposal

read(string,bytes)

Call a non-submitable (readonly function marked as pure or view) Microservice

Params

  • codeName: the ID of the Microservice to be called
  • data: ABI encoded data payload to be passed to the Microservice

setProposal()

Callable by the Proposals only. Starts the Proposal finalization procedure

startProposal(address)

Can be used by external Proposal Managers to delay the Survey Start

submit(string,bytes)

Call a submitable (which writes on the Blockchain State) Microservice

Params

  • codeName: the ID of the Microservice to be called
  • data: ABI encoded data payload to be passed to the Microservice

transfer(address,uint256,address)

Transfer a token to an address

Params

  • receiver: Address of the receiver
  • token: Address of the token to transfer
  • value: Amount of token to transfer

transfer721(address,uint256,bytes,bool,address)

Transfer an ERC721 to an address

Params

  • data: The optional payload to pass in the safeTransferFrom function
  • receiver: Address of the receiver
  • safe: Boolean flag for triggering the SafeTransfer
  • token: Address of the token to transfer
  • tokenId: ID of the ERC721 to transfer