Missing FUSD Minter Creation transactions on FlowScan

Hi all,

I’m recently studying FUSD contract, and I found some transactions are missing from FlowScan. So I’m wondering if it’s me who misunderstood the contract or it’s FlowScan misses transactions.

Would really appreciate if anyone could help look into this :slight_smile:

Here is my finding:

As I see from here, FUSD contract is deployed to account 0x3c5959b568896393 on Mainnet
https://docs.onflow.org/fusd/transactions/

Then if we check all transactions under account 0x3c5959b568896393, we can see this:
https://flowscan.org/account/0x3c5959b568896393

The first 3 transactions are for deploying contract, then the following 2 transactions are for adding new key pair, and the last transaction is for giving another account the capability to mint FUSD.

https://flowscan.org/transaction/ca6d5cee35bd76ee31db430a9a0d6d6c749efda59dff448e63eccd6f11a8d7b3/script

As we can see from the transaction, the capability is given to account 0x71c901f39f743871.

execute {

   // This is the account that the capability will be given to
   let minterAccount = getAccount(0x71c901f39f743871)

   let capabilityReceiver = minterAccount.getCapability
       <&FUSD.MinterProxy{FUSD.MinterProxyPublic}>
       (FUSD.MinterProxyPublicPath)!
       .borrow() ?? panic("Could not borrow capability receiver reference")

   capabilityReceiver.setMinterCapability(cap: self.minterCapability)

}

As we see from the transaction, it borrows a capability from account 0x71c901f39f743871, so there should be a corresponding transaction sent by account 0x71c901f39f743871 which is used to create the resource and make the capability.

There should one transaction like this sent by 0x71c901f39f743871

import FUSD from 0x3c5959b568896393

transaction {

    prepare(adminAccount: AuthAccount) {

        let minter_proxy <- FUSD.createMinterProxy()
        adminAccount.save(<- minter_proxy, to: FUSD.MinterProxyStoragePath)

        adminAccount.link<&FUSD.MinterProxy{FUSD.MinterProxyPublic}>(
            FUSD.MinterProxyPublicPath,
            target: FUSD.MinterProxyStoragePath
        ) ?? panic("Could not link minter proxy")
    }
}

But if we check all transactions under 0x71c901f39f743871 on FlowScan, there is no such transaction.
https://flowscan.org/account/0x71c901f39f743871

The first successful transaction is already “minting FUSD and sent to the recipient”
https://flowscan.org/transaction/93f02808e31248f2431d54067e754f706498182eaabdf3cbac73588f5b18f105

Is the transaction indeed missing from FlowScan?

Thanks a lot!

/Guisong

Puzzle solved!

As @yondercode pointed out, the account 0x71c901f39f743871 was created with the FUSD minter proxy included in its storage by 0x3c5959b568896393 in transaction: https://flowscan.org/transaction/42f8be8dceda59823c4abe4fba65495b73be2a47c77c2f5af772f19c75e135fe/script

More can be found here:
https://docs.onflow.org/cadence/language/accounts/#account-creation

1 Like