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 ERC20tokenAddress
: the ERC20/ERC721 token to transfer. address(0) means flush ethertokenId
: 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 proxyfunctionalitiesManagerAddress
: Address of the Functionalities ManagerfunctionalityModelsManagerAddress
: Address of the Functionality Models ManagerfunctionalityProposalManagerAddress
: Address of the Functionality Proposal ManagerstateHolderAddress
: Address of the State Holder contractvotingTokenAddress
: Address of the Voting TokenwalletAddress
: 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 ProposalisInternal
: 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 callmethodSignature
: Name of the method of the microservice you want to callneedsSender
: All microservices calls are made py the Proxy, with this boolean flag you canreplaces
: codeName of the microservice that will be replaced by this Proposal, can be blank.returnParametersJSONArray
: Array of json encoded return parameters of the proposalsourceLocation
: Location of the source code, saved in concatenated Base64 data chunkssourceLocationId
: Base64 data chunk id of the corresponding Microservicesubmittable
: 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 calleddata
: 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 calleddata
: 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 receivertoken
: Address of the token to transfervalue
: 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 functionreceiver
: Address of the receiversafe
: Boolean flag for triggering the SafeTransfertoken
: Address of the token to transfertokenId
: ID of the ERC721 to transfer