1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
@21795 , It looks like it is mayve possible to make a run contract which reads the balance in the run purse and then assigns equal amount of tokens in a jig (not sure if I have terms correct)
a 1:1 BSV to Token contract.
a simple 'color' jig
Replies
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
the reason I ask is that Im looking at building out a twetchcredits protocol wherein twetchcredits are just bsv on the backend
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
heck, you could maybe use a simple 1:1 coloring to assign purpose to outputs in a wallet.
'budget' color
'lambo money' color
1HCtG4in4yscc5FsEWyREKNk2dmj9LgMHE (523) ·
Sir, you can back the Jig with an amount of satoshis upon creation. Then read that balance and assign another token based on that.
https://run.network/docs/#jigs-backing
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
thank you!
1PHt66fLG81VvUzDc1wYwvgQarYCUXy2gp (4521) ·
Idea: a jig backed by sats that are not just sats but STAS protocol L0 tokens representing something else, say Mozambican diamond mines. Jig updates daily based on mine productivity metrics.
Cross protocol interoperable integration and …
few
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
noobishness related to JS (taking a course rn) has left me in a rekt state of uncaught syntax errors for missing ) after formal parameters.
const jigClass = await.run.load('blah')
class Token extends Jig {
mint(amount: 10000, to ?(string|Lock) Token
}
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
jigClass.upgrade(Token)
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
the jigClass being backed with the equal number of satoshis, 10,000
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
/pay @145 $5
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
also it diesnt look like im even reading the jig balance in the code lol back to school I go
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
1PsEfF8MQzHmc4VzfjUZUeJSs3HCbVMbEE
https://run.network/explorer/?query=35d6cc643fd2302cf88271ed8d94a32a3286099453e3f77c2cf11d367124d79a&network=main
1KKwemSCUDZSyQ1Bs7bqfCocE5fogkpKw1 (725) ·
console.log('Satoshis', await run.purse.balance())
Satoshis 102143