Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 9387

Tuple question - Typescript

$
0
0

Hey guys i'm having trouble with syntax.

let's say in my program i've:

pub enum SomeEnum{X,Y(Pubkey, u64),Z(otherEnum)}pub enum otherEnum{A(u64),B(u64),...}

In my fe/tests

if i want to pass the X it would be - { x: {} },
if i wanted to pass Y it would be - {y:[payee.publicKey, new BN(amount)] }

if i want to pass Z how it would be ?

trying stuff like this but it not working hmm

 { z: { A: new BN(amount) } } 

Viewing all articles
Browse latest Browse all 9387

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>