Skip to content

Commit

Permalink
Add Owner & Recovery Sign Request (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith authored Nov 22, 2024
1 parent d0c38df commit e03c63a
Show file tree
Hide file tree
Showing 2 changed files with 229 additions and 146 deletions.
28 changes: 28 additions & 0 deletions src/near-safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,4 +484,32 @@ export class NearSafe {
const bundler = this.bundlerForChainId(chainId);
return bundler.getSponsorshipPolicies();
}

deploymentRequest(chainId: number): SignRequestData {
return {
method: "eth_sendTransaction",
chainId,
params: [
{
from: this.address,
to: zeroAddress,
value: "0x0",
data: "0x",
},
],
};
}

addOwnerRequest(chainId: number, recoveryAddress: Address): SignRequestData {
return {
method: "eth_sendTransaction",
chainId,
params: [{
from: this.address,
to: this.address,
value: "0x0",
data: new SafeContractSuite().addOwnerData(recoveryAddress)
}],
};
}
}
Loading

0 comments on commit e03c63a

Please sign in to comment.