Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: null_byte on February 05, 2022, 02:24:10 PM



Title: Accessing Smart Contracts
Post by: null_byte on February 05, 2022, 02:24:10 PM
This is more out of my curiosity than for a need.

If a person would stake coins/tokens in a pool, and the website would go offline at some future time, is it possible to programmatically remove the staked coins from the pool?
If so, how is this done?

I'm assuming you would need the coin's smart contract address and knowledge of the functions in the contract. This can be normally gained from looking at the address in a blockchain explorer, correct?

Are there other ways to view the functions of a smart contract other than a blockchain explorer?


Title: Re: Accessing Smart Contracts
Post by: alexeyneu on February 05, 2022, 02:45:01 PM
it depends of all the stuff. In the end you have a little chances to withdraw money yourself


Title: Re: Accessing Smart Contracts
Post by: camat gampong on February 05, 2022, 02:49:21 PM
I'm assuming you would need the coin's smart contract address and knowledge of the functions in the contract. This can be normally gained from looking at the address in a blockchain explorer, correct?

True, but why do you want to see all that as long as you don't need anything there, because smart contracts and blockchain can always be seen every transaction that has happened there, only if you don't need it, then seeing all of it is just a waste of time just.


Title: Re: Accessing Smart Contracts
Post by: zasad@ on February 05, 2022, 04:56:01 PM
This is more out of my curiosity than for a need.

If a person would stake coins/tokens in a pool, and the website would go offline at some future time, is it possible to programmatically remove the staked coins from the pool?
If so, how is this done?

I'm assuming you would need the coin's smart contract address and knowledge of the functions in the contract. This can be normally gained from looking at the address in a blockchain explorer, correct?

Are there other ways to view the functions of a smart contract other than a blockchain explorer?
A programmer who knows the programming language of this blockchain will help you. This is not a difficult task.
What would you do when you press the Claim button? You send a transaction from your address with the parameters that the site generates for you. You can also do it yourself or with the help of a programmer.


Title: Re: Accessing Smart Contracts
Post by: null_byte on February 05, 2022, 10:06:06 PM
It was my hope that someone with some knowledge would be helpful enough to point me in the right direction so that I don't spend time re-inventing the wheel.
I surmised that it was programmatically possible, and have quite an extensive background with Python (just not in the Web3 space).


Title: Re: Accessing Smart Contracts
Post by: vv181 on February 05, 2022, 10:40:50 PM
If a person would stake coins/tokens in a pool, and the website would go offline at some future time, is it possible to programmatically remove the staked coins from the pool?
If so, how is this done?
Yes, I'm afraid I can't explain further about that.

I'm assuming you would need the coin's smart contract address and knowledge of the functions in the contract. This can be normally gained from looking at the address in a blockchain explorer, correct?
Correct

Are there other ways to view the functions of a smart contract other than a blockchain explorer?
The platform source code, pretty much you can look it up on Github.

It was my hope that someone with some knowledge would be helpful enough to point me in the right direction so that I don't spend time re-inventing the wheel.
I surmised that it was programmatically possible, and have quite an extensive background with Python (just not in the Web3 space).
If you don't want to reinvent the wheel, you can simply just build or run locally the frontend/interface. Take a look at the Github page of any platform. Usually, most of them are listing their smart contract code, SDK, frontend, etc.

As an example:
Uniswap interface: https://github.com/Uniswap/interface
Pancake frontend: https://github.com/pancakeswap/pancake-frontend


Title: Re: Accessing Smart Contracts
Post by: null_byte on February 05, 2022, 10:55:58 PM
Are there other ways to view the functions of a smart contract other than a blockchain explorer?
The platform source code, pretty much you can look it up on Github.

It was my hope that someone with some knowledge would be helpful enough to point me in the right direction so that I don't spend time re-inventing the wheel.
I surmised that it was programmatically possible, and have quite an extensive background with Python (just not in the Web3 space).
If you don't want to reinvent the wheel, you can simply just build or run locally the frontend/interface. Take a look at the Github page of any platform. Usually, most of them are listing their smart contract code, SDK, frontend, etc.

As an example:
Uniswap interface: https://github.com/Uniswap/interface
Pancake frontend: https://github.com/pancakeswap/pancake-frontend

Brilliant! That's a great start. Thank you for addressing what I was asking about!!! I don't really want to make a front end...after giving it some more thought, I'd like to make some automation to withdrawal or re-invest. I used to do quite a bit with Poloniex and had several bots running there and at a few other places, but I'd like to put some to work on the pools and farms.


Title: Re: Accessing Smart Contracts
Post by: Psynthax on February 05, 2022, 11:18:10 PM
This is more out of my curiosity than for a need.

If a person would stake coins/tokens in a pool, and the website would go offline at some future time, is it possible to programmatically remove the staked coins from the pool?
If so, how is this done?
Im not sure about this and remember that the site already become a way for you to access the stake or unstake button and this conected with the function of contract. As far as i know that it's possible to remove it from the pool as long as the contract owner or creator was doing it. If it's not locked. The main thing is in this case the contract owner has become the key to take the staked tokens or coins from the contract.

I'm assuming you would need the coin's smart contract address and knowledge of the functions in the contract. This can be normally gained from looking at the address in a blockchain explorer, correct?
That's correct. The contract creator or owner = party who can access staked tokens. The staked tokens will always be stored in an address.
Are there other ways to view the functions of a smart contract other than a blockchain explorer?
You can read the code that already published on it ( I meant blockchain explorer or github)


Title: Re: Accessing Smart Contracts
Post by: vv181 on February 06, 2022, 10:37:10 AM
Brilliant! That's a great start. Thank you for addressing what I was asking about!!! I don't really want to make a front end...after giving it some more thought, I'd like to make some automation to withdrawal or re-invest. I used to do quite a bit with Poloniex and had several bots running there and at a few other places, but I'd like to put some to work on the pools and farms.
I mean as on OP, in any case the frontend is going down, even though lately, I have seen that many dApps are already making their site accessible across many IPFS servers, you can easily access it locally so there is no need to directly communicate with the protocol/smart contract.

In regard to making an automation tool, playing around on their documentation page is surely essential to know how the platform works, thus you will be able to grasp how to make the tool. I don't recall/know if those kind of automation is already being made, but I believe you can look around on Github to see if others already make it, so you can take it as an example ;)


Title: Re: Accessing Smart Contracts
Post by: Beparanf on February 06, 2022, 10:40:53 AM
This is more out of my curiosity than for a need.

If a person would stake coins/tokens in a pool, and the website would go offline at some future time, is it possible to programmatically remove the staked coins from the pool?
If so, how is this done?

I'm assuming you would need the coin's smart contract address and knowledge of the functions in the contract. This can be normally gained from looking at the address in a blockchain explorer, correct?

Are there other ways to view the functions of a smart contract other than a blockchain explorer?

You can if you have the master key for the smart contract which only devs has access on it. There's no way anyone rather than devs can remove the token of each stakers token on the pool without the devs key.

You can view the smart contract of the project on the smart contract audit report files on whatever company done the audit. You can see much clearer code there compared on viewing it raw while having a minimal knowledge on coding.


Title: Re: Accessing Smart Contracts
Post by: alexeyneu on February 06, 2022, 01:24:38 PM

You can if you have the master key for the smart contract which only devs has access on it. There's no way anyone rather than devs can remove the token of each stakers token on the pool without the devs key.
 
this means devs will pay claim fee from own pocket. but i doubt they do. most probably it's his staking address there


Title: Re: Accessing Smart Contracts
Post by: null_byte on February 06, 2022, 10:53:15 PM
I came across this in my research, which is very much along the lines of what I was thinking. It's an article about "emergency" withdrawals (https://wiki.rugdoc.io/docs/how-to-emergency-withdraw-bsc/).