NEAR Live Contract Review | Episode 7: Berry Farm
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
We'll discuss Berry Farm, a piece of the evolving Berry Club that is discovering more and more about smart contract concepts. This includes discussions about NEP122: the allowance-free vault-based token standard. This standard may be the improvement to NEP21, which is based on the ERC20 token standard from Ethereum.
Berry Club: berryclub.io Berry Farm: farm.berryclub.io NEP122 https://github.com/nearprotocol/NEPs/...
Follow the latest from NEAR Protocol on,
Website: near.org Discord: near.ai/discord Medium: near.ai/medium Twitter: near.ai/twitter GitHub: near.ai/github
#WhiteboardSeries #Blockchain #FutureIsNEAR
Transcript
6,699 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:02
hey uh this Eugene and today we're going to talk about bur Farm contract which is supplement of the berry club that allows you to convert your bananas to cucumbers and farm near so let's first uh do quick review what is a Berry Farm and let me present okay okay so bar Farm is a a very well-designed app uh with large text and a lot of emojis so the way it works it displays your balances once you logged in uh it pulls it from two different contracts as well as your account it's
- 0:59
combines them from multiple sources avocado and bananas they can uh they come from bar or bar club contract and cucumbers are local for the that contract and near comes from your account balance so if you farmed any anything then you get um you get rewards when rewards are distributed so it seems like someone uh did a a lot of avocado purchases recently and rewards actually increased so it also has a global stats
- 1:51
which means uh 2.5k near was transferred from bur Club to um Berry Farm and also um I earned 100 near and my reward is going to be this based on amount of cucumbers I have comparing to the total number of cucumbers so the total number of cucumbers is 54k I get 3% share of this reward every time there's a reward so when I click refresh basically refreshes stats from multiple accounts and I can claim here
- 2:39
it just transfers them from um from the contract to my account and I can also swap bananas to cucumbers and what happens is I I'm doing a call to Bar clab contract saying I'm going to transfer this vault which is using the new standard and it requires a small amount of near I think it's like one yoka near to confirm that I'm not um uh I'm not doing this through access key so I cannot do a
- 3:30
transfer through an access key to avoid automatic like withdrawing and this is just a safety guard so if you for example would authorize a burry club uh from some other app that tries to like drain all your bananas it would fail because um it will not be able to call transfer row or transfer ASV transfer row is the new name for transferring without a contract so you can just deposit on someone account that exists
- 4:09
and transfer r or and transfer with wallet is calling the receiver to withd draw tokens so I spend 10 bananas get more cucumbers and I can like refresh a balance again to see if someone Draw Something no um so that's how the UI Works um but there's more functionality to this than just uh this UI it actually the contract supports cucumbers as a fungible token same as bananas so you can potentially build another app that uh transfer
- 4:49
cucumbers and there's a one more which is banana swap that Vlad Gina built which is kind of like a simplified Unis smoke with single pool where you can uh buy and sell bananas so for example I actually haven't tried that so let's try I want to get one near I need to sell for six bananas let's see if it works so it calls again bar club transfers the wall but to to a different contract and we currently don't display
- 5:28
arguments but event will okay so it's saying I transferred and I suppose I got one near oh if I go back right so I got one near I spent six bananas which is cool is there is there a profit being taken on the uh swapping side yeah so you cannot add to liquidity and it takes 10% right now it's very risk contract all right uh so this is the UI and let's go let me present the contract
- 6:09
so you'll start with um banana Farm contract but you probably will need to take a look at um uh take a look at and actual um actual token contract from Pixel board and El or like from from Barry Club as well as the one that sends tokens okay that's not easy to to use okay so bar club has a hardcoded contract called Farm contract
- 7:17
ID when uh we actually haven't reviewed this stuff when you draw it verifies that you don't draw empty pi pixels otherwise you can just trigger reverse without spending Vada um then it calls maybe send reward which uh verifies the time it it gets the current time from the blockchain it um checks that the next reward Tim stamp is less um than than the current time so the next reward is either a beginning of farming
- 8:11
time which was a global time stamp that originally enabled like a 26 hour countdown and or last last reward time stamp when we last time triggered it plus 60 Seconds so if it's time to send the next reward it remembers the current time it calculates the reward based on uh this logic so it takes the current balance of a very Club it takes the current Storage computes storage by the storage Cost
- 8:52
Plus some safety bar safety margin which is 50 near so it always keep keeps 15 year for the future balances then it's saying if balance is available like our balance is higher than the amount we need for storage plus safety then we calculate liquid balance and we divide it by portion of reward that we will give at the every time which is 2460 which um kind of if you would call it every minute then you will drain
- 9:32
majority of account but it always kind of decreasing on itself because the balance decreases on itself so but it mostly gives all balance within a day if you would call it every minute can I ask a newbie question M um so I think like there's a kind of a broad stroke a thought that I've heard in blockchain were like be very careful when you're using stuff like the time stamp from validators because a validator may be incentivized to tweak that or something say that it's like six
- 10:11
seconds earlier or whatever um and so this is a little bit tangential but like I see you're using timestamp here but that's just because I mean all the worst that can happen is someone can try to be a little bit a few seconds earlier they're going to get paid out is that is that true true well first of all you cannot produce a block that is time stamp earlier and then you cannot produce a
- 10:42
block beyond your slot which is you have a dedicated slot when you need to produce a chunk so the most you can do is produce a chunk of the final like at the final millisecond of your slot which is one second ahead uh so you can really move it Way Forward otherwise all the other notes will break the protocol as well so they are limited by like their understanding of the time plus some like bar that uh they use to to whether accept a block or not so you canot
- 11:22
really make a Time run faster unless all validators want to do this which means we have maybe not um so so the validators they will stop following the protocol actually they need to coordinate their time okay cool it sounds way more scar than I was imagining plus you're kind of limited by like a minute so even if you can do multiple multiple like like maybe you can like speed up time like 2x then you'll just get reversed
- 12:01
twice more frequently but it doesn't really change much so at then it get the reward it's saying I'm going to distribute this reward and what it does it calls Farm contract and calls take my near and U it just doesn't pass any arguments and passes reward and um gas minimum amount of gas needed to add the balances so that's how bar club was updated to start Distributing rewards after every
- 12:43
drawing potentially it takes like slightly more U so it uses gas that was spent on drawing to actually distribute the reward occasionally which needs about like 10 10 guess for this all right and so let's go to Berry Farm and start with this contract so the way Berry Farm works it needs to in constant time be able to distribute rewards based on total number of cucumbers which is not a trivial task it's somewhat similar to staking pool and how Stak and pool distributes
- 13:29
rewards so St and pool creates a bunch of shares for every deposit you make and a share has a current Global price that's saying hey I um purchased a minted more shares and now my shares can be redeemed towards um towards a given number of new tokens so the share price is starting from one so one Yoko to one share and then uh the more rewards you accumulate the more like price of share go
- 14:12
up so when you unstake you sell shares at the current price and you get near back and it's unstake and it's round down the challenge there is when you stay cucumbers the price effect cucumber zero when you first take them uh you canot really like buy shares and wi shares because the price of them is zero so the logic of shares don't do not work very well for this so for this thing uh I needed to create something different to um to do the accounting so let's go
- 14:54
into examples so let's say Mike is the first person who deposited 10 cucumbers to the contract and then uh let's say 100 near was distributed so Mike will take all the rewards because he's the only one he controls 100% of the share on a burry Farm now M Mike for example was offline and didn't claim them so we cannot really update his account because it has to be done in constant time we cannot iterate through all
- 15:33
accounts but we somehow need to remember that my got all near for his cucumbers now let's say Josh comes in and Stakes another 10 cucumbers now Mike's share is 50% and Josh share is 50% but Josh uh stay cucumbers after this initial 100 year was distributed already so he's not entitled to any of this now another 100 near drops Mike now needs to get 50 more because of 50% and jorh gets 50 now when Mike comes back online we need to be able to display his balance
- 16:20
at 150 near that he earned in a constant time so this is the challenge that we needed to address is this contract and the way uh it was solved is by um having a a a ratio that is global called near per cucumber which is saying how much near uh received by a given cucumber balance when an account is created or touched in any way uh we remember the last value of this um fraction and
- 17:25
then we have a near balance so if the last fraction was lower than the current fraction it means we can multiply cucumbers of the given account by the difference between two fractions and calculate how much near I'm entitled to so when Mike's account was created the fraction was zero divided let's say by one and when 100 near was deposited where the total cucumber count was 10 this fraction became equal to
- 18:08
10 um then once Josh joined and dropped another 10 cucumbers to total and another 100 was distributed this fraction was increased by five because there was total 20 cucumbers and 100 near so 100 near divided by 20 it means five near per cucumber so this becames 15 now when my comes back uh he looks at his cucumber balance which is 10 amount of near per cucumber on a Global Contract is 15 his last
- 18:48
remembered value is zero so he just takes the difference which is 15 multili by 10 and claims this balance into near balance and this one uh set back to 15 when Josh comes back he gets this value was at 10 and he has 10 cucumbers and the current value is 15 the difference is five multipli by cucumber balance of 10 gets 50 so that's how we manage near balance or like appropriate the rewards
- 19:26
received by um from people using the oops I copied something uh using a constant time to recalculate it so instead of keeping entire fraction in a memory so we use a global denominator which is fixed and I use it to 10 in 18 uh which is same as a Precision of uh cucumbers bananas and avocad so let's uh so that's kind of a background how it's all computed let's look at the main structure of the contract a contract called Farm it has a
- 20:20
lookup map of accounts and it uses short hashes similar to um to fible token this volts it has the banana token account ID which can be hardcoded as well but uh it was used from the contract because we can actually pass it because this account was deployed after and I didn't want to upgrade banana um or like Barry Club contract state so I didn't want to modify the state again through upgradability so instead I hardcoded the value in the previous
- 21:06
cont now near per cucumber this is the fraction that I explained and this is numerator uh total cucumber balance total near received total near claimed uh this is actually not needed uh this is also not needed it just for statistics this is needed as a denominator volts and next volt for transfers they actually probably was never used to transfer cumers except maybe once for test so this is what we saw before this
- 21:47
is again a hash of the account ID and account structure is uh the last value before the account was touched of this fraction near balance um so this is the balance unclaimed balance so whenever you touch an account either by depositing more cucumbers or claiming near it uh updates last value and moves all the unclaimed near to your local balance out of the difference and cucumber balance is your balance in cucumbers and Final near claimed is the
- 22:38
statistics that just saying how much reward you already claimed it's not needed for contract logic there's two helper structures just for front end so human account returns values in more readable way and human stats is like statistics Global statistics for consumption okay so we disabled default uh there is a high level API can we back up a little bit to the uh I just want to make sure that I have the correct mental model for the global um fraction is that what you're calling
- 23:30
it yeah my uh my like metaphor for this that I'm using is that it's kind of similar to the way um like a flex box element is divvied up but I don't quite get how it's changing per um minute so like my mental model is like Mike pays in 10 um right like he's the only one who's there so far so it's like having one element inside a flex container it it 100% goes to m when Josh comes in and puts in five now
- 24:01
there's 15 total so Mike is going to get a 10 share and Josh is gonna get a five share and so that means Mike gets 2/3 Josh gets one3 um that makes sense to me how does it change with the um like per minute what's the like walk me through that again in terms of like Mike was the only one there in minute one so when the block reward when the like reward is calculated at the end
- 24:32
of that minute it will look at who paid in within that minute is that so it uses the total balance which is this one which is going to be 10 a denominator originally yes 10 and it calculates how much near if you would like deposit originally and never touch your account then you have some fixed balance of cucumbers so whenever you change this balance you touch your account so and then
- 25:13
sorry I didn't follow that so let let's go into this function to actually take a look how it works it may be slightly more clear so it's called take my near that is a bu Club calls it attaches a balance attach deposit so first thing we check that there's enough cucumbers there because we use it as a denominator so before this it say I don't take near because no one take enough cucumbers which is one one cucumber needed to actually trigger this and this just precaution
- 25:54
before uh so you don't like trigger this type of stuff like explore this uh value so what happens is you get amount of near and yoka near and you multiplied by denominator Global so you solv in a fraction which is something like uh near per cucumber divided by denominator plus uh new New Balance or like attached balance divided by total cucumber balance uh by yeah I'm like this so
- 26:59
so this is actually numerator not really near per cucumber because it contains the denominator so so near per cucumber is actually numerator is denominator plus tou deposit which was previous denominator and if you want to delete this then you just divide it by denominator right so this is the formula we use to calculate the new near per cucumber it's a the old value which is this um or we can have it split into numerator denominator denominator doesn't need to
- 28:00
change so it's always like one or 10 and 18 and you calculate this new value does this make sense kind of I I feel like I I probably need a little little diagram or a little like I don't know some something but yeah I I trust that it makes sense but I'm having a little bit of a hard time following so sure yeah that's what I was using like drawing it for a while before I figured it out so
- 28:46
Mike's value is uh was zero and once it became 15 multipli by denominator but whatever then uh we'll get get to the claiming actually so when you're trying to claim uh you have account. touch and account. touch does the following it calculates the difference uh between Global Den numerator and your numerator so then it multiplies it by your cucumber balance and divides by denominator so you get the balance you earned a near we add this to near balance and reset to the current value
- 29:35
so pretty much it always whenever you touch an account it always makes your current unclaimed balance or like unclaim difference between two to a fixed number and then you can modify any of the values without breaking the logic so how does the front end eventually call this touch method uh it doesn't it's like it's it automatically T like called by every getter and every change method so it before you modify the
- 30:16
account it always calls touch on the account so so for example get near balance so we get the internal account if account exists then we touch it locally then we just get you the newer balance or if you get the account we touch it before then get you near balance cucumber balance and claim balance it's a wait a second those are view functions that changing things right but it doesn't save it so it just temporary changes the the account value
- 30:59
I don't it doesn't save it back it doesn't save it back I don't get it it just like makes a touch which is just kind of recompute with the latest value when does it actually save it so when it saves it when you actually do any change call so for example call to claim near so you get your account and this one get mute account actually touches the account so you get the account that is
- 31:39
already uh updated so near balance is actual balance so it takes near balance to zero it's saying you claimed all of this it saves your account and then if you claim positive value then we will transfer it to you out of your account and say oh yeah I I actually like transfer it globally this and it returns how much near you claimed or if you yeah I I don't want to get stuck on this but I guess I just don't understand what the view methods
- 32:13
that change something a changing it in memory but then once but then someone will have to do a change method that like spins up the VM loads the contract does all this stuff in the memory like is starts over from scratch right or do I not understand how that works so so that's the beauty of this touch method because it this can be called at any point it doesn't have to be called at a given point so it's always going to give you the same
- 32:43
result no matter whether you called it twice in the middle or called it once Al so Al so this is just returning what it this is just for returning to the user like how much they've got does right right so it just tells you how much near you earned kind of by calculating from the current state gotcha okay so let's look at how you actually it's a noteworthy trick I feel like that's a pattern that I would not have come up with myself
- 33:21
that like I don't know should we um I just want to call it out I want to note it and then we can move on so club we do the same stuff uh we we have touch as well and this is needed because let's say you want to know how many bananas you farmed because we know last time you touched your account like when you last draw something um we know how many pixels you have so we can calculate from a given time to the previous time
- 33:53
multiplied by the number of pixels you had how many bananas you should have right now and the frontend just does the same thing like frontend simulates it it gets the same info except latest and then it just creates a timer going forward that calculates it so in theory this particular method doesn't have to return your near value that is up to date it can just say oh here's a total cucumber or total
- 34:24
near per cucumber and and your last total and last near per cucumber and also your last near balance like do calculate it yourself if you want to so instead um it's done on the contract level so let's say we didn't have view methods um for which you don't pay and only retrieved estate then you would have to do this Logic on the front end instead of uh doing it here in memory okay so the most uh the final logic that we need to do is actually how you receive your
- 35:08
um cucumbers from bar club and this is done by using transfer with VA from bar club so we did um we just discussed this before how the NP 122 works so you pass receiver ID amount and the payload uh it has a check assert paid which is checks that the deposit is positive so it's saying oh you need at least one yoker to prevent function access key calls to avoid malicious Berry Club UI to drain all your
- 36:12
bananas so it gets the gas and then it initiates a call so it puts bananas into a vault and uh it initiates call to receive in this case we call it on Farm contract and it passes um it passes sender ID amount of bananas a vol ID which is just a u64 without Json and a payload which is string in the previous example when we were talking about map 122 the payload was a u v u64 a binary a vu8 in base 64 because it was B
- 37:12
serialized payload but as during the discussion I noted that um if you would review this argument in a wallet like what you're trying to do you will not be able to see the payload that you want to do so in this contract implementation we actually use Json for the payload so we use Ser the Json from string payload and it's inam there a single option called deposit and stake so now when you do a function call from
- 37:59
Farm UI that will go to the wallet in the arguments the payload actual payload will be like a string within a string adjacent string within a string say deposit and stake instead of being some zero included as a base u8 like instead of being a b calized version It's a human readable one so it may help you to this contract that has different payload types such as unislope for example it will have a payload saying how much near you you
- 38:39
want to at most uh receive or like at least receive and the malicious Unis swop UI can just actually replace this value and if you didn't verify it on like a on a wallet side then you may actually U get robbed on the like bad fee or front R ask a really not weird question on line 220 um I'm just curious where you're using like references on right yeah right like for is that just a little bit more efficient uh because in order to
- 39:25
compare local Str I think I need so I actually don't know if this can work because this one is a string while this one is is not a string it's a reference to a string otherwise I'll have to copy it out of the self does it make sense okay I get self you have to clone it yeah okay it can be a thirt but I I think a thir slightly more expensive than doing this because this is like who doesn't create debug info on the two
- 40:07
variables that mismatched cool thanks doesn't create formatting and debug so this is another thing to put in the like Pro tips uh so this is actually interesting there's effort about no STD going on and I assume once we swap SD format to something like a core quick format or whatever it's called We Will We may also need to swap assert macro to stuff like this and it will be like as
- 40:49
cheap but also if you at least once used assert and format somewhere in this file it doesn't matter because cost of this will be like almost zero difference just another small format all right uh so we got the account using get mute account which is gets uh AER an existing account or it creates a new account where it set all balances to Z zero but the last near per cucumber numerator to be the current one
- 41:35
Global which means you didn't Farm anything and you have zero cucumber balance so it does touch anyway even if it doesn't need to so we can have avoided it if we did map um and then it returns hash and account and it's already up to date account so what we do we first increase the total cucumber balance and then we save it back to state of the account and we also increase the global cucumber balance by amount of cucumbers he deposited and
- 42:17
then we don't really verify that the Vault contained cucumbers so we us that the previous Coler which is a banana contract actually put this bananas into the Vault and we return this uh promise out of this method so it's a weird match with a single entry because spay can be only one type right now why wrate it as a match just because Z ipating adding other kinds of payloads yeah just like to to be like a kind
- 43:04
of future proof otherwise I can just ignore a payload and like say oh yeah you don't need to pass a payload but this actually gets you some verification that it's correct Co um so yeah we call withdraw from Vault we saying the amount we want to withdraw which is a full amount and then uh we call it back to the banana token account ID which is a b Club contract and that's it so even so this contract
- 43:43
didn't receive bananas yet it doesn't care uh because um because it doesn't use Banas anyway so doesn't need bananas before it can proceed so no matter how long it's going to take like cucumbers are there and the vault is already locked so this is fine and that's it that's how you got the banana or cucumbers and also increase the total cucumber balance by diluting the shares of everyone so now
- 44:23
when uh claim near oh no when take my near arrives it will use the new Total cucumber balance and now will split across all participants including you with your number of uh shares and there's um that's it so this is the logic of the farm but you can see there's another another module that we actually haven't even needed to touch and this module is a fible token on top of uh cucumbers it has a trade that implements The
- 45:12
Vault nap 122 and then it has the implementation which is very precisely similar to bananas except for using account I and it has um it doesn't have a method to register an account so you cannot uh one second where is it in uh withdraw from sender or maybe deposit right so it expects that deposit account already exist this So to avoid spamming through transfers so the only way to create an account with cucumbers
- 46:03
is to deposit at least one banana and there is no method to unregister an account so we don't need to handle a case when the account is deleted during the Vault transfer so that's it uh basically the banana Farm is just a this part is just copy from other contract mostly just with small modifications but it's a perfect example of how to implement tokens so long as you have some like helper methods such as get internal
- 46:51
account and get mute account which touches the account so maybe if we introduce this as a trade as well and create a dependency something like um plus like account get account manager and then do something like trade count manager which is going to have a barri Farm um this interface okay one second so what you can do is um basically if you
- 47:58
standardize these three methods and then say that the farm is actually implementing count manager for Farm um all right need to do a touch so see the compile some not so this R interface telling that this trade depends on this trade uh even so
- 48:59
it doesn't have to um then I can just have a default implementation for a given tradeit such as um I can potentially do this probably not so yeah nearby doesn't really support this so if I create it internals and then just have a wrapper then potentially I can create a generic token trade that implements everything here except for get total Supply which also needs a understanding of the
- 49:43
self but um that's a minor thing but the goal here would be if we can standardize a small um account manager type then potentially um and we need a trade for account then potentially we can create a a crate and publish this crate which is a fible token implementation for a generic account that will allow you to just say something like uh impo n NP 122 for farm and then you just need to do a bunch of reps um for near Bon and you'll
- 50:53
just use the internal logic that is with Vols and uh identifiers to to start working with your contract and you will have an n122 interface working for you so this would be cool and I think it's a worse doing this effort so long as we can standardize certain things such as account right now it has near balance but we need to trade something like account uh which is maybe has a or account manager has a good balance for a given
- 51:52
account so then you just Implement some wrappers around and uh given a variable to increase balance decrease balance or deposit withdraw and then you're done so that's it for this particular contract I will say that a lot of this went over my head but I think that we can use this as a model for a lot of stuff um one one thought that is kind SL slightly related to this that I think would be really fun because it seems
- 52:24
like you keep iterating this Berry club which is which is which is great I know one like Hot Topic right now in just like crypto Twitter and crypto in general is like what's the best um like bonding curve if you're trying to you know incentivize people to start using you know Barry Club version 2 or whatever like people get like better better returns in the beginning and there's all these like curves that you can see um that like benefit either
- 52:49
early adopters but also will benefit you know folks later on as well um like have you thought about adding token bonding curves or anything like that to this well it's also hard to track um so like if you didn't thought about some kind of like historic data that you need to save then maybe it's a problem to add this later especially with bonding curves that usually require time so I don't think for any of the
- 53:27
accounts I have time on chain so it's all like not on chain but on on contract level it's all on the historic chain level only so you you pretty much need a light client of near to prove something at the historic event that like this a given account let's say was created at a given time and spent so much year so if this data is not on a contract site then it's it's hard to get
- 54:07
it any other questions so what's next what's the next for B Club I don't know so so bur Club has um a bunch of people who uh tries to like overdraw on top of existing so in order to avoid that I uh added a opacity feature and opacity feature let me just show it quickly doesn't actually change the mechanics of um of a contract so it doesn't require a contract change but it's mostly only front end change so this is a new bar that is set to like
- 55:01
20% by default so if you want to try to ruin banana so if you draw on top of banana um then it doesn't actually destroy it it just makes it look very dirty and you can see like it actually resembles some art instead of just being fully random as in the past El solution for this may be to set a default color to something like a is white or black which will make all Farmers like just instead of making a random
- 55:39
noise um make it like a darker and darker over time so like art is fading out but it's not unified so if you set the opacity I guess to be whatever you call that the solid color does that cost more no no no just gives you a warning say like don't destroy art if you want to farm bananas draw is low opacity but yeah so if you draw with uh just like put a fully a pass pixel let me Farm
- 56:19
bananas six bananas for one year right now on banana swap I don't know you can if you can get the this deal from farm and CU Converse anymore um any other questions and what we discussed today like cool thanks yeah thank you so so I think the next uh think would be really cool if we can unify or like design some type of crate for NV 122 where you don't really need to implement any of this logic and just
- 57:15
like either have some type of derve or just implement it using traes is it possible to do that um I guess if you did it just in wasm it doesn't give you as nice of tooling like yeah I I I'll experiment with um with near Bon to see if Bine expands um expands values on implementation so let's see if it still compiles and okay let's try again let me present the contract to see if we can get this to
- 58:08
work um so what I will do is let's say we can create a trade B trade uh test and then we're going to implement a method um let's say test one one and then it should do self and return you 64 and return 42 so what it does it has a default implementation for red one so what I wonder if if I write impul test for farm and then put near Bon on it will it actually expose my method or
- 59:10
not um and then I need to near Dev deploy very far if it does then it's super cool because uh you can actually Implement um Implement logic in a trade as default methods and then just import and uh all you need to is uh do non like non default methods so like methods that actually requir so something like get total Supply or get a
- 1:00:12
balance and then account manager can potentially like increase balance decrease balance like change balance so yeah near view this um right one right so method not found so it means near Bion by default doesn't export this um Methods at the same time if I do for example red two and say 43 for red one then well not really I need to actually do this
- 1:01:14
here and then I can do red s red one so basically I will have to potentially proxy all the methods to internal methods or we need to modify near Bon to something like near Bon tra if it's available probably not because it only has access to the local thing maybe it can iterate on a trade methods and expose them all to um deployed uh contract sure doesn't is not
- 1:02:16
initialized well but at least it has a at least it has the view call so this is the way you can do this so we can basically have a something like nap 122 tra that contain something stuff like uh transfer raw ell blah blah blah blah and then has all the logic and then you just expose transfer row VI with the same argument and internally maybe just copy this piece and just do proxy to the
- 1:03:03
arguments and it will be a little ugly at the beginning but at least you can uh reuse this so it worth um trying to do this that' be a big step be awesome oops cool well thanks everyone uh for listening and asking questions see you next time Co