Is there a way to implement a factory pattern contracts with rust on solana? Is it similar to the ethereum way? Please show an example.
Went through discord and docs, probably missed it, but couldn't find an answer.
What is the workaround, if missing?
Welp, the answer is that it is an anti-pattern, better not do that. Learned it here
But if you want to try, a workaround probably exists, and it might be smth like (didn't succeed, but maybe you will):
cargo build-bpf
solana program write-buffer
after that use functions like here
got help from discord solana tech server
Related
I'm building an API using KOA and have read some best practise on versioning. This answer pointed out that versions should be hidden from the client.
My question is, how would I go about doing this? I've read some mentions of using an API proxy. Would I be using something like "Squid" as a reverse-proxy, or are there better Node/KOA specific solutions for this type of work?
I think GraphQL is the perfect tool to avoid pain in the ass with API.
Yes, in some point it breaks the REST philosophy but gives flexibility.
All you need to build a flexible API with no worry about version is: Koa, Objection + GraphQL.
I want to use gio and glib to create client-server communication. However, I'm getting confused with GSocket. Can someone give some examples.
Also, how can GMainLoop be helpful in this?
You don't want to use GSocket directly, go for GSocketService and GSocketClient which abstract the messy parts quite nicely.
I think the title is enough for understanding what I need.
What I want to get is a piece of code that injects 1 packet into another software socket.
My research on this turned some ways to accomplish this
I found something about LibPCap, but I don't know if this is able to inject packets too. I know it capture packets.
Another way was to use Hook API (inject some DLL's) ... but I didn't understand this, so I haven't managed to use it.
Port forwarding was another way
None of this was successful for me because I wasn't focused on any of this one. I want to know witch one is the easiest way to implement and I'll be happy to hear your ideas on doing this.
BEFORE POSTING: I'LL USE THIS JUST TO CHECK OUT SOMETHING ON MY PROJECT. I WON'T USE THIS TO HARM OR HACK.
If you can go with a little python, scapy should do the trick quite easily :)
There are a bunch of services (dyndns, nettica, etc.) that offer API's but I'm having trouble with Nettica's and I was just wondering if anyone has a nice gem suggestion for any of the DNS services... I'm not set on one or the other.
Thanks for any help in advance.
Chad
This just in, Nettica does work as intended, but you need to buy the bulk DNS service in order to enable the AddRecord API call....... wasn't documented clearly but their support was able to point this out.
What is a good approach to a client proxy written in ruby that I can use to create a custom filter.
So far I've found
Ruby Proxy using webrick
Mousehole, a scriptable Ruby proxy by _why (UPDATE this was not robust)
A little on the fringe, this guy wants to Use rack as thin proxy with his question. I don't think he got an answer; or even a hint that it was possible.
What is your advice on these suggested approaches or do you have a better approach.
Thanks!
I can’t speak on personal experience as I’ve not done this myself, but I have heard of mouseHole before and it seems to be a good package. Why not try writing a simple script for it and see how you find it?
There are also some sample scripts in that repository that you could check out.