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

Updated tx flow declaration format + updated governance txes #652

Open
wants to merge 30 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
55a8627
Updated tx flow declaration format
bpierre Dec 13, 2024
94e791a
Merge branch 'next' into governance-tx-flow
bpierre Dec 13, 2024
763cc82
LQTY ABI update
bpierre Dec 13, 2024
f8dc848
Merge branch 'next' into governance-tx-flow
bpierre Dec 14, 2024
ceacbac
Merge branch 'next' into governance-tx-flow
bpierre Dec 14, 2024
a0099ab
Update Governance ABI
bpierre Dec 14, 2024
4d1622d
Fix signPermit() (add the token name)
bpierre Dec 14, 2024
afa75d5
useStakePosition() is now checking the user proxy address
bpierre Dec 14, 2024
6fb8174
Add verifyTransaction() to the tx flows utils
bpierre Dec 14, 2024
10dad07
stakeDeposit() tx flow: fix permit & approve flows
bpierre Dec 14, 2024
e377110
tx flows: use verifyTransaction()
bpierre Dec 14, 2024
aa860aa
TransactionFlow: revert awaiting-commit to idle when reloading a step
bpierre Dec 14, 2024
eef2590
Remove unused code
bpierre Dec 14, 2024
921fb16
StakeScreen: insufficient balance error
bpierre Dec 14, 2024
4112787
Update Governance ABI
bpierre Dec 14, 2024
0beee8d
Transactions screen: "Next transaction" => "Next step"
bpierre Dec 14, 2024
39eca4d
stakeDeposit tx flow: remove rewards (they are now separated)
bpierre Dec 14, 2024
588f36b
stakeDeposit tx flow: rename the user proxy deployment step to be "In…
bpierre Dec 14, 2024
a23b43f
stakeDeposit tx flow: pass userProxyAddress from the previous step ra…
bpierre Dec 14, 2024
e582cc8
stakeDeposit tx flow: deploy the user proxy contract with permit too
bpierre Dec 14, 2024
5076a18
Merge branch 'next' into governance-tx-flow
bpierre Dec 14, 2024
2e5f070
Stake summary card: loading state
bpierre Dec 15, 2024
c8be0f6
Staking panel: improved errors
bpierre Dec 15, 2024
fec8504
Unstake tx flow: unstake from Governance + remove rewards
bpierre Dec 15, 2024
c9624f5
Update env vars format
bpierre Dec 16, 2024
d3936aa
allocateVotingPower tx flow
bpierre Dec 16, 2024
30addf1
Merge branch 'next' into governance-tx-flow
bpierre Dec 17, 2024
a668607
Merge branch 'next' into governance-tx-flow
bpierre Dec 17, 2024
5a1d6d2
Merge branch 'next' into governance-tx-flow
bpierre Dec 19, 2024
31354d5
AnchorTextButton: className inheritance
bpierre Dec 19, 2024
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
11 changes: 8 additions & 3 deletions contracts/utils/deployment-manifest-to-app-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ function deployedContractsToAppEnvVariables(manifest: DeploymentManifest) {

// governance contracts
for (const [contractName, address] of Object.entries(governance)) {
const envVarName = contractNameToAppEnvVariable(contractName, "CONTRACT");
const envVarName = contractNameToAppEnvVariable(
contractName,
contractName.endsWith("Initiative") ? "INITIATIVE" : "CONTRACT",
);
if (envVarName) {
appEnvVariables[envVarName] = address;
}
Expand Down Expand Up @@ -217,10 +220,12 @@ function contractNameToAppEnvVariable(contractName: string, prefix: string = "")
return `${prefix}_LQTY_STAKING`;
case "governance":
return `${prefix}_GOVERNANCE`;

// governance initiatives
case "uniV4DonationsInitiative":
return `${prefix}_UNI_V4_DONATIONS_INITIATIVE`;
return `${prefix}_UNI_V4_DONATIONS`;
case "curveV2GaugeRewardsInitiative":
return `${prefix}_CURVE_V2_GAUGE_REWARDS_INITIATIVE`;
return `${prefix}_CURVE_V2_GAUGE_REWARDS`;
}
return null;
}
Expand Down
39 changes: 39 additions & 0 deletions frontend/app/src/abi/Erc2612.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { erc20Abi } from "viem";

// https://eips.ethereum.org/EIPS/eip-2612
const permitAbiExtension = [
{
name: "permit",
type: "function",
stateMutability: "nonpayable",
inputs: [
{ name: "owner", type: "address" },
{ name: "spender", type: "address" },
{ name: "value", type: "uint256" },
{ name: "deadline", type: "uint256" },
{ name: "v", type: "uint8" },
{ name: "r", type: "bytes32" },
{ name: "s", type: "bytes32" },
],
outputs: [],
},
{
name: "nonces",
type: "function",
stateMutability: "view",
inputs: [{ name: "owner", type: "address" }],
outputs: [{ type: "uint256" }],
},
{
name: "DOMAIN_SEPARATOR",
type: "function",
stateMutability: "view",
inputs: [],
outputs: [{ type: "bytes32" }],
},
] as const;

export default [
...erc20Abi,
...permitAbiExtension,
] as const;
Loading
Loading