- Adding support for Matic/Polygon
- Adding the
preRegister
flag to the process Mode
tokenCount()
TokenStorageProof contract method wrapper returnsnumber
- Token Storage Proof
- When registering a token any event is emitted
- Deleted
uint32 tokenCount
state variable - Added
tokenCount()
function which returns thetokenAddresses.length
-
Token Storage Proof
- Added
verified
attribute on ERC20Token: Indicates if thebalanceMappingPosition
stored is verified or not - Any token holder can register a token without a proof. If a token holder wants to register a token with a verified balanceMappingPosition, two transactions are required: First
registerToken()
, secondsetVerifiedBalanceMappingPosition()
- Any token holder can change an unverified balanceMappingPosition
isRegistered()
can only be called externally- For getting the token info stored on the contract:
tokens(tokenAddress)
will return{registered, verified, balanceMappingPosition}
- Added
-
Processes
- Added
costFromWeight
onEnvelopeType
: On EVM-based census processes (weighted), the user's balance will be used as the maxCost. Allow splitting the voting power. - Added Process attribute
owner
: Creator of a process on behalf of the entity (on-chain census) - Added
onlyTokenRegistered
&&onlyHolder
modifiers - Process creation divided into two different methods:
newProcessEVM
&&newProcessStd
for on-chain && off-chain processes respectively evmBlockHeight
Process attribute changed tosourceBlockHeight
get(processId)
returns[2]string entityAddress_owner
instead ofstring entityAddress
- Now the owner of an on-chain census can update the question index of a process if the process allows to do so
- Added
- EVM Census: storage-proof-validation enabled
- Adapting the deploy script for
xdai
andsokol
- Renaming the exported TypeScript interfaces for consistency
EnsRegistryContractMethods
,EnsResolverContractMethods
,ProcessesContractMethods
,IProcessCreateParamsTuple
,IProcessStateTuple
,ResultsContractMethods
,GenesisContractMethods
,NamespacesContractMethods
,Erc20StorageProofContractMethods
,Erc20StorageProofTestContractMethods
- The Processes contract is now payable
- A price can be defined for every process that is created (to prevent spam)
- The Processes contract now has a
withdraw
function, callable by the owner - Split the Namespaces contract into Namespaces and Genesis
- The Genesis contract acts as a global register of Chains (chain ID, genesis, oracles, validators)
- The Namespaces contract acts as a global register where process contracts register themselves
- The Processes contract has been adapted to the new Namespaces contract
- The
Processes
methodsetResults
andgetResults
are now part of a future contractResults
- Oracles now set a process' results on the Results contract
- The results contract can then set the
RESULTS
status on the process contract
EnsPublicResolver
is now renamed toEnsResolver
in TypeScript- Validators now have a
bytes32
data type getNextProcessId
no longer required thenamespace
parameter- Namespace indexes now start at index
1
. Zero is reserved.
- Allowing to retrieve and count registered ERC20 tokens
- Adding the chainID as a process contract parameter, so that process ID's do not collide if multiple chains host the same entity
- Minor fix to support CA process contract parameters
- Breaking: Census Origin indexes updated (grouped by type)
- Adding
OFF_CHAIN_TREE_WEIGHTED
andOFF_CHAIN_CA
- Renaming
OFF_CHAIN
intoOFF_CHAIN_TREE
- Adding
- Renaming
censusMerkleRoot
intocensusRoot
(internal) - Renaming
censusMerkleTree
intocensusUri
(internal)
- Using
_isBigNumber
instead of comparingsourceBlockHeight
withBigNumber
- Storing the census Root on EVM processes
- Typing the
tokenStorageProofAddress
Solidity getter
- Fix two checks on the process
mode
for EVM processes - Adapt the TypeScript wrappers to reflect these changes
- Add the
overrides
parameter toregisterToken
- Adding a missing TS type
- Minor changes
- More descriptive revert error
- Returning
paramsSignature
as null inProcessContractParameters.fromContract()
Breaking changes
- Process contract
- Removing the redundant flag
MODE_ALLOW_VOTE_OVERWRITE
ofmode
. UsemaxVoteOverride
Instead. - Moving
mode
>MODE_ENCRYPTED_METADATA
at the position ofMODE_ALLOW_VOTE_OVERWRITE
. - Moving
uniqueValues
as a flag ofenvelopeType
- Merging
namespace
as an argument withmaxTotalCost
andcostExponent
innewProcess()
andget()
- Splitting
newProcess
into two internal functions for off-chain censuses and EVM based censuses - Adding
censusOrigin
andenum CensusOrigin {OFF_CHAIN, ERC20, ERC721, ERC1155, ERC777, MINI_ME}
- Using
startBlock
andblockCount
asuint32
- Storing the sourceBlockHeight as the census snapshot point for EVM processes
- Removing the redundant flag
- Adding
Chainable
andOwnable
as base contracts ofProcesses
- Adding the
TokenStorageProof
contract andITokenStorageProof
- Adding the library
ContractSupport
- Using
IERC20
from OpenZeppelin
- Allowing to pass transaction options in
ProcessContractParameters.toContractParams()
- Using the ENS registry contracts from xENS and OpenZeppelin.
- Exporting
IMethodOverrides
- Using Ethers v5
- Removing
getEntityId
from the contract (no longer needed, since entityId == entityAddress) - Adding
ensHashAddress
as a reference hash function to interact with the ENS nodes
- Exposing
IProcessCreateParams
- Adding
ProcessContractParameters
to wrap and upwrap the params tuples submitted and retrieved from the Smart Contract - Removing
wrapProcessCreateParams
andunwrapProcessState
- Allowing to read the raw
value
fromProcessMode
,ProcessEnvelopeType
andProcessStatus
- The process contracts are now future proof
- Instances can now be frozen and forked
- Process state can be retrieved from any predecessor
- Two new methods are available
activate
andactivateSuccessor
, to handle the transition with a single source of truth at all times - For future versions to interact with deprecated ones,
ProcessStore
is now available as an interface - Calls on processes created before
activationBlock
will be forwarded to the instance that holds them - Updates on predecessor instances need to be made there, since
msg.sender
would not allow forwarding from the successor - Inactive instances won't allow to create new processes or update the census
- The namespace data has been moved to a separate contract (Namespaces)
- The
NamespaceStore
interface is also available, for all versions to be able to reference it
- The
Substantial Voting contract refactor to support a wide range of participatory processes
- Adding
mode
,envelopeType
andstatus
to every process- Process mode flags (auto start, interruptible, dynamic census, vote overwrite, encrypted metadata)
- Envelope type flags (serial envelopes, anonymous voting, encrypted votes)
- Status (ready, ended, canceled, paused, results)
- Providing TypeScript wrappers to work with them
- Adding
questionIndex
andquestionCount
for serial voting - Adding
maxCount
,maxValue
,uniqueValues
,maxTotalCost
,costExponent
,maxVotesOverwrite
andparamsSignature
to parameterize processes - Introducing namespaces
- Chain ID, genesis data, validators and oracles now belong to a namespace
- Global getters are replaced by
getNamespace()
- Unified naming conventions for getters, setters and events
- Condensed contract parameters into tuples
getProcessId()
is now pure- The processId is computed using the namespace instead of the genesis data and the chainId
- Using Solidity 0.6.x
- Testing using in-memory Ganache server, which enables self-sufficient CI tests
- Refactoring the tests to run with Ethers.js
- Refactoring the testcases to use Ethers.js
- Use an in-memory internal Ganache testnet to test