How to write tests for Proxy (Truffle)

Hi @sven,

Welcome to the community :wave:

To test our upgradeable contract, we use the ABI of the implementation contract with the address of the proxy contract.

Please see OpenZeppelin Upgrades: Step by Step Tutorial for Truffle for an example of testing via the proxy contract using OpenZeppelin Upgrades Plugins (see documentation for test usage: https://docs.openzeppelin.com/upgrades-plugins/1.x/truffle-upgrades#test-usage).

Let me know if you have any questions.

1 Like