Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create unit tests to verify Smart Contract has been delegated properly #10

Open
molekilla opened this issue May 3, 2021 · 0 comments
Open

Comments

@molekilla
Copy link

Use case

As a smart contract, I need to delegate to EOA to be able to sign

  1. Crea una cartera nueva (address)
  2. XDVController.delegateOwnerToAccount(..., expiration = 10 min)
  3. Firmar usando DID de Universal Wallet cualquier documento (hash, sig)
  4. Valida el DID XDVController.validDelegate....
  5. XDVController is DIDDelegateHandler
  6. Enviar firma (hash, sig) == must return true

Prueba positiva

As a smart contract, it should fail if delegate expiration expired

  1. Crea una cartera nueva (address)
  2. XDVController.delegateOwnerToAccount(..., expiration = 10 s)
  3. Firmar usando DID de Universal Wallet cualquier documento (hash, sig)
  4. Valida el DID XDVController.validDelegate....
  5. XDVController is DIDDelegateHandler
  6. Enviar firma (hash, sig) == must return false

Prueba negativa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant