Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature add program gas station #395

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from

Conversation

gBaGu
Copy link
Contributor

@gBaGu gBaGu commented Nov 24, 2022

No description provided.

@gBaGu gBaGu requested a review from vldm November 24, 2022 20:43
@vldm
Copy link
Collaborator

vldm commented Nov 29, 2022

#386

@gBaGu gBaGu marked this pull request as draft December 9, 2022 11:13
@gBaGu gBaGu marked this pull request as ready for review December 15, 2022 13:07
.ok_or(ParseEvmContractToPayerKeysError::InvalidFormat)?;
let contract = Address::from_str(addr)
.map_err(|_| ParseEvmContractToPayerKeysError::InvalidEvmContract)?;
let payer = Pubkey::from_str(key1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gas_station ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed payer to gas_station_payer, removed address/key names

#[structopt(long = "gas-station")]
gas_station_program_id: Option<Pubkey>,
#[structopt(long = "redirect-to-proxy")]
redirect_contracts_to_proxy: Option<Vec<EvmContractToPayerKeys>>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use Vec without option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed option

@@ -0,0 +1,53 @@
## Build and deploy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add example of evm contract, with method.
And write small script that anyone can use to test it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

to register payer account that will be paying for incoming evm transactions
if they meet its filter conditions:

``velas evm create-gas-station-payer -u <public rpc> -k <signer keypair>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make owner key optional, by default use signer keypair.
Add command to modify gas station params.

Maybe we should have a way to generate file from abi?

### Start bridge

Run evm-bridge command with next additional options:
``--gas-station <program id> --redirect-to-proxy <evm contract address>:<payer owner pubkey>:<payer storage pubkey>``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why u need owner pubkey?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Owner is used as a seed for derived address of gas-station payer.

… readme accordingly, add script to deploy test gas-station, create payer and run bridge
@gBaGu gBaGu force-pushed the feature-add-program-gas-station branch from d371712 to d5cd1fe Compare January 25, 2023 19:25
@gBaGu gBaGu requested a review from vldm February 13, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants