What does this implement/fix? Explain your changes.
This PR adds 'live' certificates for deployment on Polygon PoS;
It also adds config that is specific to the Polygon PoS chain;
It enables deposit and withdraw restrictions to be turned off by setting the RESTRICT_TOKENS environment variable to disable;
It extends the requirement to hold an appropriate x509 certificate and not be on a sanctions list to Proposers and Challengers as well as Users.
The latter point has required some refactoring because the State.sol contract became too big (the token restrictions code was moved to Shield.sol from Config.sol because only Shield.sol actually uses it.
What commands can I run to test the change?
There is a new unit test which checks that X509.sol can correctly parse the new certificates. npm run unit-test-x509-live
What does this implement/fix? Explain your changes.
RESTRICT_TOKENS
environment variable todisable
;The latter point has required some refactoring because the
State.sol
contract became too big (the token restrictions code was moved toShield.sol
fromConfig.sol
because onlyShield.sol
actually uses it.What commands can I run to test the change?
There is a new unit test which checks that
X509.sol
can correctly parse the new certificates.npm run unit-test-x509-live