Create Smart Contracts in Pact

Get Nucredits

The NuChain Faucet is a simple centralised system that allows users to request NuCredits (NUC). Even though it’s a small contract, we’ll cover the majority of Pact’s features in the process of building it. The faucet contract is intended for use on a test network, so it will allow anyone to request funds.

We’ll implement these features in idiomatic Pact:

  1. Any NuWallet user can request funds from the faucet, with the faucet account signing on their behalf.

  2. By default, users can request up to 20.0 NUC per call to request funds and up to 100.0 NUC in total.

  3. The faucet account can increase the per-request and per-account limits for any account (but it cannot decrease them).

  4. You can return funds to the NuChain faucet, which will credit against your total account limit.

  5. You can look up your account’s per-account and per-request limits and see how much NUC you can still request.

Last updated