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

feat: update staking contract addresses #579

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/config/activityCheckers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const OPTIMISM_ACTIVITY_CHECKERS: ActivityCheckers = {};

export const BASE_ACTIVITY_CHECKERS: ActivityCheckers = {
[ActivityCheckerType.MemeActivityChecker]: new MulticallContract(
'0xAe2f766506F6BDF740Cc348a90139EF317Fa7Faf',
'0x026AB1c5ea14E61f67d245685D9561c0c2Cb39Ba',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

MEME_ACTIVITY_CHECKER_ABI,
),
};
Expand Down
8 changes: 4 additions & 4 deletions frontend/config/stakingPrograms/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import { StakingProgramMap } from '.';

export const BASE_STAKING_PROGRAMS_CONTRACT_ADDRESSES: Record<string, Address> =
{
[StakingProgramId.MemeBaseAlpha]:
'0x06702a05312091013fdb50c8b60b98ca30762931',
[StakingProgramId.MemeBaseAlpha2]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

'0xc653622FD75026a020995a1d8c8651316cBBc4dA',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

};

export const BASE_STAKING_PROGRAMS: StakingProgramMap = {
[StakingProgramId.MemeBaseAlpha]: {
[StakingProgramId.MemeBaseAlpha2]: {
chainId: EvmChainId.Base,
name: 'MemeBase Alpha',
agentsSupported: [AgentType.Memeooorr],
Expand All @@ -29,7 +29,7 @@ export const BASE_STAKING_PROGRAMS: StakingProgramMap = {
ActivityCheckerType.MemeActivityChecker
],
contract: new MulticallContract(
BASE_STAKING_PROGRAMS_CONTRACT_ADDRESSES[StakingProgramId.MemeBaseAlpha],
BASE_STAKING_PROGRAMS_CONTRACT_ADDRESSES[StakingProgramId.MemeBaseAlpha2],
STAKING_TOKEN_PROXY_ABI,
),
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/config/stakingPrograms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ export const DEFAULT_STAKING_PROGRAM_IDS: {
} = {
[EvmChainId.Gnosis]: StakingProgramId.PearlBeta,
// [EvmChainId.Optimism]: StakingProgramId.OptimusAlpha,
[EvmChainId.Base]: StakingProgramId.MemeBaseAlpha,
[EvmChainId.Base]: StakingProgramId.MemeBaseAlpha2,
};
18 changes: 9 additions & 9 deletions frontend/constants/serviceTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const SERVICE_TEMPLATES: ServiceTemplate[] = [
home_chain: MiddlewareChain.BASE,
configurations: {
[MiddlewareChain.BASE]: {
staking_program_id: StakingProgramId.MemeBaseAlpha, // default, may be overwritten
staking_program_id: StakingProgramId.MemeBaseAlpha2, // default, may be overwritten
nft: 'bafybeiaakdeconw7j5z76fgghfdjmsr6tzejotxcwnvmp3nroaw3glgyve',
rpc: 'http://localhost:8545', // overwritten
agent_id: 43,
Expand All @@ -182,16 +182,16 @@ export const SERVICE_TEMPLATES: ServiceTemplate[] = [
},
env_variables: {
BASE_LEDGER_RPC: {
name: "Base ledger RPC",
description: "",
value: "",
provision_type: EnvProvisionType.COMPUTED
name: 'Base ledger RPC',
description: '',
value: '',
provision_type: EnvProvisionType.COMPUTED,
},
CELO_LEDGER_RPC: {
name: "Base ledger RPC",
description: "",
value: "",
provision_type: EnvProvisionType.COMPUTED
name: 'Base ledger RPC',
description: '',
value: '',
provision_type: EnvProvisionType.COMPUTED,
},
TWIKIT_USERNAME: {
name: 'Twitter username',
Expand Down
2 changes: 1 addition & 1 deletion frontend/enums/StakingProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export enum StakingProgramId {
PearlBeta5 = 'pearl_beta_5',
PearlBetaMechMarketplace = 'pearl_beta_mech_marketplace',
OptimusAlpha = 'optimus_alpha',
MemeBaseAlpha = 'meme_base_alpha',
MemeBaseAlpha2 = 'meme_base_alpha_2',
}
4 changes: 2 additions & 2 deletions operate/ledger/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
"optimus_alpha": "0x88996bbdE7f982D93214881756840cE2c77C4992",
},
Chain.ETHEREUM: {},
Chain.BASE: {"meme_base_alpha": "0x06702A05312091013FdB50C8b60B98ca30762931"},
Chain.BASE: {"meme_base_alpha_2": "0xc653622FD75026a020995a1d8c8651316cBBc4dA"},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jmoreira-valory not sure if the name is shared between FE and BE only or it should be updated in the service/agent/something else as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Tanya-atatakai it is shared between both,

staking_program_id: stakingProgramId,

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Tanya-atatakai The staking contract ID (e.g., meme_base_alpha_2) is passed to the backend only in the service template when creating/updating a service. Based on that value, the backend will fill a number of env variables ("COMPUTED") that deppend on the particular staking contract.

Please see comment above from @truemiller regarding the frontend.

Chain.CELO: {
"meme_celo_alpha": "0xf39cd0eE4C502Df7D26F28cFAdd579724A3CFCe8",
"meme_celo_alpha_2": "0x95D12D193d466237Bc1E92a1a7756e4264f574AB",
},
Chain.MODE: {
"optimus_alpha": "0x5fc25f50E96857373C64dC0eDb1AbCBEd4587e91",
Expand Down
2 changes: 1 addition & 1 deletion templates/memeooorr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ service_version: v0.0.1
home_chain: "base"
configurations:
base:
staking_program_id: meme_base_alpha
staking_program_id: meme_base_alpha_2
nft: bafybeiaakdeconw7j5z76fgghfdjmsr6tzejotxcwnvmp3nroaw3glgyve
rpc: http://localhost:8545 # User provided
threshold: 1 # TODO: Move to service component
Expand Down
Loading