Ilario
Ilario

Reputation: 6079

Cannot resolve "coin.transfer

I'm learning the Pact language, and I'm looking at a contract already developed and available on the mainnet.

In this contract there is:

(coin.transfer owner ADMIN_ADDRESS (* (get-price) amount))

there is no table created in the contract called coin and the compiler gives me the error:

Cannot resolve "coin.transfer

Upvotes: 0

Views: 107

Answers (1)

Kitty Kad
Kitty Kad

Reputation: 444

The coin contract exists on the blockchain. I'm guessing you're trying to call coin.transfer locally in your REPL.

To do this - you will need to

  1. Load the coin contract and any dependencies (such as the fungible interfaces) into your REPL first
  2. Create any accounts you want to interact with (such as the accounts for owner ADMIN_ADDRESS

Then you should be able to interact with the coin contract as you would on the blockchain

Upvotes: 3

Related Questions